Scheduled Task accessing network drive
Posted on 2005-03-04
This is a general question about accessing network drive files using scheduled task. Let's say I have a file on my network drive called "Z:\" I want to copy this file to my local computer using dos commands that are either on a local batch file, VBS file or a compiled .exe program.
The code would be something like the following:
system("copy "Z:\file.txt" "C:\file.txt"");
This code is saved in the above mentioned batch, VBS, or .exe program.
1) When I run this program manually, this copy would work.
2) When I run this program off a windows scheduled task where both the source and destination folders are on my local computer, it would copy accordingly.
However, the combination of the two above:
3) When I run this program off a windows scheduled task where the source folder is a network drive, the file cannot be read.
I have windows XP installed. Just wondering what is going on with this case. Is there some sort of windows security that prevents me from accessing the file with scheduled task when it is in a network drive? Thanks for any comments.