Robocopy not copying all folders


  1. Posts : 2
    Windows 7 Entreprise 64 bits
       #1

    Robocopy not copying all folders


    Hi,

    I want to use Robocopy to backup the data from my external hardrive D to a file called 'Backup' in a cluster storage W.
    I only want to backup the modified and new files. In other words, I don't want to back up all the files in D every time I run Robocopy.

    This is what I wrote by reading other posts on the forum:
    title Backup personal files
    robocopy D:\ W:\Backup /e /mir /np /tee /log+:backup_log.txt
    pause

    However, the script below does not back up all the files.
    Any suggestion on how I can improve the robocopy script?

    Thanks a lot for your help!
      My Computer


  2. Posts : 19,383
    Windows 10 Pro x64 ; Xubuntu x64
       #2

    ROBOCOPY is a FOLDER copier, not a FILE copier - the source and destination syntax arguments in ROBOCOPY must reference folder names.

    So your example:
    Code:
    robocopy D:\ W:\Backup /e /mir /np /tee /log+:backup_log.txt
    needs to be modified to:
    Code:
    robocopy D:\Folder_1 W:\Backup /e /mir /np /tee /log+:backup_log.txt
    where Folder_1 is the name of the folder on D: that requires backing up.

    If you have more than one folder in D: that requires backing up, then you need to specify each folder, for example:
    Code:
    robocopy D:\Folder_1 W:\Backup /e /mir /np /tee /log+:backup_log.txt
    robocopy D:\Folder_2 W:\Backup /e /mir /np /tee /log+:backup_log.txt
    robocopy D:\Folder_3 W:\Backup /e /mir /np /tee /log+:backup_log.txt
    etc.
    etc.
      My Computer


  3. Posts : 2
    Windows 7 Entreprise 64 bits
    Thread Starter
       #3

    Fantastic, thank you very much! It is now working very well.
      My Computer


  4. Posts : 19,383
    Windows 10 Pro x64 ; Xubuntu x64
       #4

      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 11:01.
Find Us