Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I run a robocopy batch file that reads:

robocopy "C:\Users\mgo\Documents" "E:\Documents backup on the UltraBay drive" /mir

the destination folder gets renamed to "E:\My documents" WHY? How to keep that from happening? What arguments can I use to preserve the destination folder name?

This only happens when doing robocopy from a SYSTEM folder (My documents, My pictures, etc) but not when I create a non-system folder and copy the contents to a non-system destination folder that I created. Then the destination folder name does not change. Obviously, it's a Library/System folder thing...

share|improve this question

You need to exclude desktop.ini which tells windows how to display the name of the My Documents folder. The switch /XF desktop.ini will do this.

Use the following:

robocopy "C:\Users\mgo\Documents" "E:\Documents backup on the UltraBay drive" /mir /XF desktop.ini
share|improve this answer
I tried this out, it works. you can also go in after the copy and delete the desktop.ini file manually. It's a hidden system file so you have to change your view settings. – Doltknuckle May 13 '14 at 17:49

I believe it is because the actual directory is named "My Documents". If you go into Windows Explorer, start at C and drill down into the users directory into the users profile you will see that it is actually called "My Documents". Documents is similar to a shortcut and is not the true folder name.

share|improve this answer

Here's what I do:

robocopy %USERPROFILE%\Desktop   %DRIVE%%BACKUPFOLDERNAME%\Desktop   /COPY:DAT /A /S /FFT /R:0 /W:30 /TEE /ETA /XO /LOG:"%USERPROFILE%\Documents\backuplogs\my_desktop.txt" 
robocopy %USERPROFILE%\Favorites %DRIVE%%BACKUPFOLDERNAME%\Favorites /COPY:DAT /A /S /FFT /R:0 /W:30 /TEE /ETA /XO /LOG:"%USERPROFILE%\Documents\backuplogs\my_favorites.txt"
robocopy %USERPROFILE%\Documents %DRIVE%%BACKUPFOLDERNAME%\Documents /COPY:DAT /A /S /FFT /R:0 /W:30 /TEE /ETA /XO /LOG:"%USERPROFILE%\Documents\backuplogs\my_documents.txt"
robocopy %USERPROFILE%\Downloads %DRIVE%%BACKUPFOLDERNAME%\Downloads /COPY:DAT /A /S /FFT /R:0 /W:30 /TEE /ETA /XO /LOG:"%USERPROFILE%\Documents\backuplogs\my_dowloads.txt"
robocopy %USERPROFILE%\Music     %DRIVE%%BACKUPFOLDERNAME%\Music     /COPY:DAT /A /S /FFT /R:0 /W:30 /TEE /ETA /XO /LOG:"%USERPROFILE%\Documents\backuplogs\my_music.txt"
robocopy %USERPROFILE%\Pictures  %DRIVE%%BACKUPFOLDERNAME%\Pictures  /COPY:DAT /A /S /FFT /R:0 /W:30 /TEE /ETA /XO /LOG:"%USERPROFILE%\Documents\backuplogs\my_pictures.txt"
robocopy %USERPROFILE%\Videos    %DRIVE%%BACKUPFOLDERNAME%\Videos    /COPY:DAT /A /S /FFT /R:0 /W:30 /TEE /ETA /XO /LOG:"%USERPROFILE%\Documents\backuplogs\my_videos.txt"
share|improve this answer
While you've provided code, this answer lacks any explanation of the the code. – Jason Aller May 13 '14 at 17:43

Your Answer


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.