raj8 has asked for the wisdom of the Perl Monks concerning the following question:
use Win32::ChangeNotify; $SCRIPT_PATH= "c:\\scripts"; $SCRIPT = "c:\\scripts\scripts_file"; Win32::ChangeNotify::FindFirst( $Monitor, $SCRIPT_PATH, 1, FILE_NOTIFY_CHANGE_ATTRIBUTES || FILE_NOTIFY_CHANGE_SIZE) || die "Cannot create a change notification object. Error:" . Win32::FormatMessage( Win32::GetLastError() ) . "\n"; print"\n"; open(SFILE,">>$SCRIPT") || die "Cannot open includes for writing:$!"; while( $Monitor->FindNext() ) { print "Monitoring noted filesystems....\n"; $Monitor->Wait( INFINITE ); print "\t A change to $SCRIPT_PATH\n"; } $Monitor->Close(); close(SFILE);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Monitoring filesystem
by $code or die (Deacon) on Feb 22, 2001 at 02:30 UTC | |
|
Re: Monitoring filesystem
by enoch (Chaplain) on Feb 22, 2001 at 02:36 UTC |