Batch file or Perl script not working in task scheduler
I've come across this problem a couple of times over the last few weeks. It boiled down to, on both occasions, the use of mapped network drives IE; copying files across a network!
Microsoft is not a CLI friendly OS and to that end a drive mapped to z: for example is not an actual real drive unless the user is logged on and the drive is mapped.
When Task Scheduler runs a task it seems it only creates a minimal shell for that task to run in and that does not include enabling mapped drives.
You batch file will run find when you manually run it but just won't work when you schedule it and this is the reason why.
To stop this issue don't use the mapped drive letter use the full UNC path AND make sure the user running the task has the correct permissions to do what ever it is your batch file us trying to do!