in reply to Re^7: Question in Win32::ChangeNotify...
in thread Question in Win32::ChangeNotify...


Thanks a lot for the reply. It finally worked for me!

But i have one more issue now:

To analyse the changes done to the directory that i am monitoring, i create snapshot files b4 and after the change and i compare them - that's how i find out what exactly has changed

The problem is this:

after each notification and comparison of the snapshot files, i delete the snapshot files by using this piece of code:

$cmd = "del snapshot*.txt";


if(system($cmd))

{

print "delete failed\n";

}

else

{

print "delete snapshot*.txt successful!\n";

}


The file deletion works fine if i run the script from the command line; but when i run the script from the task scheduler, it just does not delet the files! Would anybody know why?

Thanks
  • Comment on Re^8: Question in Win32::ChangeNotify...

Replies are listed 'Best First'.
Re^9: Question in Win32::ChangeNotify...
by BrowserUk (Patriarch) on Jul 14, 2008 at 17:13 UTC

    Probably a permissions issue. Ie. You will need to schedule the script to run as a user with permission to delete the files. How you do that will depend upon how you are scheduling the script. Ie. RTFM :)


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.