batch file does copy to mapped drive if scheduled

  • Thread starter Thread starter RK
  • Start date Start date
R

RK

I've made a batch file to xcopy some files from my local
system to a mapped drive. The files get copied, whenever
the batch file is run. But if I schedule it at some other
time and if the screen is locked or logged off, it does
not copy the file on the mapped drive. Both the systems
are using windows 2000 professional and they once mapped
both systems run continuously.

Rgds
RK
 
The drive won't be mapped if the user who mapped it isn't logged on, have
you tried copying the files to a UNC path in the batch file instead of a
mapped drive?

Also the scheduled task will need to run as an account with access rights to
the share

Peter Lawton
 
In addition to the other reply - if you can't use a UNC for some reason,
include

net use x: \\server\share /persistent:no
<xcopy job>
net use x: /del /yes

in your batch file.
 
Back
Top