I am trying to copy the content from a mounted drive to this computer. The following command works perfect when I run it directly on cmd
. But when I make a bat
file and run it through windows Scheduled Task, it says the drive is invalid.
Drive Y
is actually the drive of another computer on the network and is mounted to this computer to share the content.
C:\WINDOWS\system32>xcopy /s /Y Y:\Database\* D:\Backups\TaskMania\Database\
Invalid drive specification
0 File(s) copied
If the drive Y
is invalid, how is it working directly though cmd
then?
I have also set the Scheduled Task to run with Administrator
privileges.