Windows 7/8/10 - Copy & Replace only when there is a difference
I'm not sure about interactively determining when to copy vs. when to rename, but you may want to look at Robocopy. It's native to Windows Vista and above.
Related videos on Youtube
Trashman
Formerly a Trashman, currently an electrical engineer.
Updated on September 18, 2022Comments
-
Trashman over 1 year
Windows 7 and above have a somewhat "smarter" copy method than predecessors when duplicate filenames have been used. The dialog box will ask if you want to (using Windows 7 as the example) "Move(or Copy) and Replace", "Don't Move(or Copy)", or "Move(or Copy), but keep both files". This is nice, and great for single files, or sets of files with only a couple identical names. It also has an option to "Do this for the next XXX conflicts" - which is also great if you want to do the same thing with every file conflict if there are many.
Now, I'm consolidating large numbers of large files created by a dozen or so other users across multiple drives. They have also been shared between them. So, sometimes the identically named files are identical, and sometimes they're not.
Another "smart" thing built into the file copy is that it can tell me if either of the two files are "larger" or "newer" than the other. So, currently, I can base my decision - file by file, on which option to choose. However, when copying thousands of files, this becomes very tedious and time consuming.
Is there a way - either with a 3rd party software, or with a command-line or batch file, to have just a little bit more logic to the process? For example, I would like to always "Move and Replace" if the timestamp and size are identical and "Move, but keep both files" if there is any difference in either the timestamp or the size.
-
Trashman over 7 yearsFinally got to try Robocopy today. Running from the source directory:
Robocopy . [destination] /S /MOVE
worked perfectly. I did not need interactive, I specifically wanted to NOT be interactive.