This is using windows 2008 server. I create a batch file, and put it into the task scheduler, and end up error code 4 as follows:
action "C:\Windows\system32\cmd.exe" return error 4.
Pls see below for the content of the batch file:
xcopy h:\labour\* S:\labour\%date:~0,3%\* /y /q /e
If I run the batch manually, it completes successfully. But, if I schedule to run it daily, it failed, why?