Scheduled robocopy fails with error 3 (Creating Destination Directory)

network-sharerobocopywindows 7windows-server-2000

Related: Scheduled Robocopy task fails with 0x10 error

I'm using robocopy as part of a server backup script. It fetches the files to this workstation (Windows 7, upgraded from Vista – that caused some quirks before), and then copies them to a server in LAN (Windows Server 2000).

robocopy H:\folder \\SERVER\drive\folder /MIR /LOG:H:\backup.log /TBD /TEE

When this task runs in scheduled tasks, usually the network folder has not been accessed yet by the computer since startup. As such, it usually ends up failing:

-------------------------------------------------------------------------------
   ROBOCOPY     ::     Robust File Copy for Windows                              
-------------------------------------------------------------------------------

  Started : Fri Jul 12 16:16:03 2013

2013/07/12 16:16:03 ERROR 3 (0x00000003) Getting File System Type of Destination \\SERVER\drive\folder
The system cannot find the path specified.


   Source : H:\folder
     Dest - \\SERVER\drive\folder

    Files : *.*

  Options : *.* /TBD /TEE /S /E /COPY:DAT /PURGE /MIR /R:1000000 /W:30 

------------------------------------------------------------------------------

2013/07/12 16:16:03 ERROR 3 (0x00000003) Creating Destination Directory \\SERVER\drive\folder
The system cannot find the path specified.

As you can see, I tried using /TBD switch to wait for network share names to be defined. It did not help. However, forcing the scheduled task to run manually later successfully updates all the files. Though I didn't access the server backup folder during that time, I did access a different share on the server.

What should I do? Add a retry in the batch script? Or use a different program to make sure the network path is available before continuing?

Best Answer

Check your permissions.

Your "manual" run , probably runs as admin , or the other way around.