Robocopy Help RRS feed

  • Question

  • I'm trying to create a simple incremental backup system for users on our network using robocopy. I wrote and tested the batch file on a windows xp machine and it worked great, but on the first 7 machine I tried it on the program hung and kind of looped I think. It kept trying to upload the same files ( a very small portion of the backup ). I didn't think there would be any difference between the switches in XP than 7 but maybe I am wrong. 

    The XP file

    @echo off
    robocopy "C:\Documents and Settings\*localuser*\My Documents" "\\server\sharefolder\My Documents" /e /z /XO /XA:SHT /r:10 /w:1 >> "\\server\sharefolder\backuplogdocs.txt"
    robocopy "C:\Documents and Settings\*localuser*\Desktop" "\\server\sharefolder\Desktop" /e /z /XO /XA:SHT /r:10 /w:1 >> "\\server\sharefolder\backuplogdt.txt"

    I made very small changes to the version I used on the 7 file

    @echo off
    robocopy "C:\Users\*localuser*" "\\server\sharefolder" /e /z /XO /XA:SHT /r:10 /w:1 >> "\\server\sharefolder\log.txt"

    Any ideas as to what made the batch hang/loop?

    Friday, August 15, 2014 7:43 PM


  • Hi,

    The loop in Windows 7 might be caused by the junction points, please try to add /XJ switch and see if the issue could be solved.

    More information, we could take a look at the reply of TW Simpson:

    Windows 7 infinite loop while using Robocopy

    Best regards

    Michael Shao
    TechNet Community Support

    • Marked as answer by sO lOST QQ Monday, August 18, 2014 12:29 PM
    Monday, August 18, 2014 8:06 AM