Windows 10: Robocopy Help - Backing Up Files in Destination Folder Before Purging

Discus and support Robocopy Help - Backing Up Files in Destination Folder Before Purging in Windows 10 Software and Apps to solve the problem; Hi,I've been using Robocopy to clone a Source folder on one device to a Destination on another using /mir for a while now, and I was wondering if it... Discussion in 'Windows 10 Software and Apps' started by SoeroahMyrddin, Aug 5, 2024.

  1. Robocopy Help - Backing Up Files in Destination Folder Before Purging


    Hi,I've been using Robocopy to clone a Source folder on one device to a Destination on another using /mir for a while now, and I was wondering if it was possible to move any Extra files as opposed to deleting them.Specifically, I'm imagining using two commands: One to first scan the two folders, identify any Extra files in the log and list them, without altering any of the files.Second, my usual string, which would clone my Source to my Destination.My question is: is it possible to write a Robocopy command that will check for Extra files that exist in the Destination folder but aren't in the S

    :)
     
    SoeroahMyrddin, Aug 5, 2024
    #1

  2. Robocopy, protecting files/folders in the destination folder when using /MIR switch

    Hi Frederik - I just did a test using the command below:

    cmd /C Robocopy "C:\Users\MyName\Desktop\source" "C:\Users\MyName\Desktop\dest" /XD "New folder" /XF *.csv /MIR

    As it turns out, using the regular /XD and /XF switches seemed to spare "New Folder" and "test.csv" in the destination directory from being purged, even though they did not exist in the source directory. I had (wrongly) assumed those switches would only
    exempt which folders/files would be copied over to the destination, and thus purge accordingly.

    Oops ¯\_(ツ)_/¯
     
    Matty_McMattface, Aug 5, 2024
    #2
  3. How to copy a folder structure (including files within) into multiple folders simultaneously.

    These four ROBOCOPY commands will accomplish what you want.

    From Command Prompt, run:

    robocopy "C:\Users\John\Downloads\Source" "C:\Users\John\Desktop\Destination\Folder J" /MIR

    robocopy "C:\Users\John\Downloads\Source" "C:\Users\John\Desktop\Destination\Folder K" /MIR

    robocopy "C:\Users\John\Downloads\Source" "C:\Users\John\Desktop\Destination\Folder L" /MIR

    robocopy "C:\Users\John\Downloads\Source" "C:\Users\John\Desktop\Destination\Folder etc..." /MIR

    Optionally, you may create a Batch file containing the above commands on your desktop.

    For more information about ROBOCOPY, run robocopy /? in Command Prompt.

    The /MIR parameter mirrors a directory tree, which also means that any extra items in the destination folder will be removed.

    • /MIR :: MIRror a directory tree (equivalent to /E plus /PURGE).
    See also:

     
    Ramesh Srinivasan, Aug 5, 2024
    #3
  4. jaxx_rr Win User

    Robocopy Help - Backing Up Files in Destination Folder Before Purging

    robocopy /MIR deleted all my files in the destination folder..

    ok so robocopy /MIR deleted all my files in the destination folder..

    IT SHOULD HAVE AT LEAST A CONFIRMATION PROMPT BY DEFAULT !!!
     
    jaxx_rr, Aug 5, 2024
    #4
Thema:

Robocopy Help - Backing Up Files in Destination Folder Before Purging

Loading...
  1. Robocopy Help - Backing Up Files in Destination Folder Before Purging - Similar Threads - Robocopy Help Backing

  2. Robocopy Help - Backing Up Files in Destination Folder Before Purging

    in Windows 10 Gaming
    Robocopy Help - Backing Up Files in Destination Folder Before Purging: Hi,I've been using Robocopy to clone a Source folder on one device to a Destination on another using /mir for a while now, and I was wondering if it was possible to move any Extra files as opposed to deleting them.Specifically, I'm imagining using two commands: One to first...
  3. destination folder

    in Windows 10 Gaming
    destination folder: i want to download a game. I dont know what destination folder i could use. https://answers.microsoft.com/en-us/windows/forum/all/destination-folder/8ca458d8-51fe-4f34-9f79-d78b1a677bad
  4. destination folder

    in Windows 10 Software and Apps
    destination folder: i want to download a game. I dont know what destination folder i could use. https://answers.microsoft.com/en-us/windows/forum/all/destination-folder/8ca458d8-51fe-4f34-9f79-d78b1a677bad
  5. Destination's Folder

    in Windows 10 Network and Sharing
    Destination's Folder: That it is full now and how does one empty it to allow backup space? https://answers.microsoft.com/en-us/windows/forum/all/destinations-folder/e67d4a5e-cda5-4b2a-af7d-fb0bd2d2afee
  6. Robocopy missing some files and folders

    in AntiVirus, Firewalls and System Security
    Robocopy missing some files and folders: We are planning to midgrade our fileserver from server 2012 R2 to 2019. When running robocopy to transfer files and fodders to 2012 R server to 2019, it shows no failed. However, if I check drive size and files copied on these two server, they are different.2012 R2 shows...
  7. Files not backing up but folders are.

    in Windows 10 Network and Sharing
    Files not backing up but folders are.: OneDrive seems to be working correctly but in my picture directory, the folders are there but all of them are empty. Pictures are still in the folders on the local computer. How can I make OneDrive attempt to sync again? It syncs without errors but not updating the folders....
  8. robocopy /MIR deleted all my files in the destination folder..

    in Windows 10 Network and Sharing
    robocopy /MIR deleted all my files in the destination folder..: ok so robocopy /MIR deleted all my files in the destination folder.. IT SHOULD HAVE AT LEAST A CONFIRMATION PROMPT BY DEFAULT !!! https://answers.microsoft.com/en-us/windows/forum/all/robocopy-mir-deleted-all-my-files-in-the/b19d3974-5695-4f0e-ad4a-4eb5552eca41"
  9. Robocopy Destination Naming Confusion

    in Windows 10 Support
    Robocopy Destination Naming Confusion: My command is: Code: ROBOCOPY C:\Users\mikei\Documents J:\HP.Files /MIR /XD "C:\Users\mikei\Documents\FeedbackHub" "C:\Users\mikei\Documents\Cyberlink" /v /tee /ts /log:"I:\log.HP.temp.txt" [/quote] Have I made an error again? Earlier I tried to run a similar command as...
  10. Purged deleted folder

    in Windows 10 Installation and Upgrade
    Purged deleted folder: I deleted a large folder by accident. It was apparently too large for the recycle bin and was purged. I need it back. My backup to a Seagate external drive does not find the most recent version of the folder intact (as a separate entity) but instead shows thousands of...