Computer Hope

Microsoft => Microsoft DOS => Topic started by: jantzman60 on October 09, 2009, 12:47:51 PM

Title: XCOPY command in bat file doesn't run as scheduled task
Post by: jantzman60 on October 09, 2009, 12:47:51 PM
Hi,

I have been testing the copying of files from a test directory on one server (Windows 2008) to another server (Windows 2003).

I can successfully execute the XCOPY command in a 'bat' file, but when I schedule the ‘bat’ file as a scheduled
task, the command doesn't work.

XCOPY "E:\backup test\test folder" "\\poweredge\Backups" /C /E /H /I /Y

What am I missing?  Something related to permissions?

Thanks!
Title: Re: XCOPY command in bat file doesn't run as scheduled task
Post by: macdad- on October 09, 2009, 03:07:27 PM
Did you schedule the script from the Scheduled Task Wizard or did you use the AT command?
Title: Re: XCOPY command in bat file doesn't run as scheduled task
Post by: jantzman60 on October 13, 2009, 09:11:36 AM
macdad,

Thanks for the response.  I scheduled the script from the Scheduled Task Wizard.

I found the solution.  A friend commented that dos xcopy won't let you use a URL
and that I would need to map a drive.  Mapping the drive allowed the xcopy to work!
Title: Re: XCOPY command in bat file doesn't run as scheduled task
Post by: billrich on October 13, 2009, 04:10:39 PM
 :)