Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm trying to run a patch file every morning at 4am. For whatever reason, the lines in the batch file that use robocopy.exe are skipped. I've also tried xcopy and cp(from UnxUtils). The batch file works perfectly if I manually run it. When task schedule runs the batch file it hits every single line perfectly, but ignores the lines that use robocopy. There are other lines in the batch file that call other executables, and those work just fine.

I can't for the life of me figure out what is going on. I set up some logging in the batch file to make sure it was hitting all the points and it is. It just does not execute the robocopy lines.

Any help would be appreciated.

share|improve this question
add comment

1 Answer 1

I just add the same problem, it seem that Task Scheduler has problem using mapped drive. So I change the map drive to use the UNC path and everything started working.

robocopy C:\Data J:\Backup *.*

changed for

robocopy C:\Data \\ServerName\Backup *.*
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.