Robocopy is the tool to use when working with entire directories, since that's what it was designed to do. Let's say you want to "mirror" directories, i.e., make two directory trees contain identical files/folders. This is similar to using the /E switch (which is covered under the tip titled "Using Robocopy to Copy Entire Directories") along with the /PURGE switch. (The /PURGE switch tells Robocopy to delete destination files/folders that no longer exist in source.) The shorthand switch to mirror directories is /MIR, so the command to mirror directories is:
C:\> ROBOCOPY C:\Temp1 C:\Temp3 /MIR
This results in the creation of C:\Temp3, and all of the files and folders under C:\Temp1 will be copied to the newly built tree under C:\Temp3. In addition, if C:\Temp3 already existed, any files in its tree that are not in the C:\Temp1 tree will be deleted from the C:\Temp3 tree.
This tip (13197) applies to Windows 7, 8, and 10.
Windows 10 provides multiple ways to work with compressed files and folders. One great way is to use the Zip utility, ...
Discover MoreKeeping track of your resources can help you avoid serious computer problems. Having an adequate amount of disk space is ...
Discover MoreIf you have a file that you're sure you want to permanently delete (instead of having it go to the Recycle Bin) it's an ...
Discover More2018-03-02 23:45:56
george renee
Just to share one thing I read on a Microsoft TechNet:
Although useful in some scenarios, using /Z switch makes copying much slower.
"Copying files in restartable mode is about 6x slower over a network than in normal or backup mode due to the necessary management overhead."
..I use GS RichCopy Enterprise which has features like copying long file path names, copying NTFS file permissions and is not too costly..
2018-02-12 13:08:43
vikas
use robocopy
2017-10-10 11:55:22
Len Richard
I didn't understand exactly what mir did. I copied around 300 cds to an external drive, then delete them from the folder they were in, so I could store more there for backup. When I again backed up this folder to my external drive it wiped out everything i had previously backed up. I did a googlie on this and discovered I was not the only person who got screwed. There needs to be a clear Warning Visible that nobody can miss explaining this. I tried 10 free recover tools, none worked. I finally found a trial version of a recover software, it worked and it cost be 70 bucks to purchase it. It was either that or lose everything. Nice to notice you have this explained. Too bad every other person offering advice doesn't.
Copyright © 2024 Sharon Parq Associates, Inc.
Comments