I want to copy a file from a linux server, samba share already set up, to a windows server using the task scheduler. I've mapped a network drive to the samba share, created a .bat file with the xcopy command to copy the file from the samba share(mapped network drive Z) to the local disk on the windows machine. When I run the .bat file in the command line it is working 100% and the file is copied, but when I add the .bat file to the task scheduler the following error occur : "Backup.job" (Backup.bat)
Finished 2008/02/11 01:30:00 PM
Result: The task completed with an exit code of (4).
I've looked up the error code : The system cannot open the file.
Why is it working in command line, but not in the scheduler, I've set up the Administrator password for the task but still returns the same error code.