- Local time
- 4:16 AM
- Posts
- 1,990
- OS
- Windows 10 Pro
Thanks, I added the switches /XJ /XJD /XJF then verified that the script below works on a W10 and a W11 machine :):)
On the W11 machine, I tried to mirror the AppData folder with the script (including the 3 switches) but robocopy still hangs
On the W11 machine, I tried to mirror the AppData folder with the script (including the 3 switches) but robocopy still hangs

:: Robocopy script by Haydon and others on elevenforum.com version 0.02
:: IMPORTANT: Use the script at your own risk, folks!
:: This robocopy script mirrors the contents of the Users folder Haydon to the Haydon folder on the external D: drive.
:: Change the name of the external drive to D: if need be.
:: Mirror means copy and delete, run the script for the latest mirror.
:: The Haydon folder on the external drive holds a full mirror along with file security info like file creation date, etc.
:: IMPORTANT: Check the log file ROBOLOG on the D: drive after running the script for any failures.
:: /B :: copy files in Backup mode
:: /MIR :: MIRror a directory tree
:: /XJ :: eXcludes Junction points, which are normally included by default
:: /XJD :: eXcludes Junction points for Directories
:: /XJF :: eXcludes Junction points for Files
:: /R:n :: number of Retries
:: /W:n :: Wait time between retries in seconds
:: /LOG: :: Output specified LOG file at specified location, the first command line has no + , subsequent command lines have the + , to append and consolidate the logs in one big log file.
:: pause :: keeps the CLI window open after running the script, useful for debugging purposes
robocopy.exe C:\Users\Haydon\Documents D:\Haydon\Documents /B /MIR /XJ /XJD /XJF /R:2 /W:20 /LOG:D:\ROBOLOG.txt
robocopy.exe C:\Users\Haydon\Pictures D:\Haydon\Pictures /B /MIR /XJ /XJD /XJF /R:2 /W:20 /LOG+:D:\ROBOLOG.txt
:: add command lines for additional folders to mirror. Does NOT work for the AppData folder!
:: pause
Last edited:
My Computer
System One
-
- OS
- Windows 10 Pro