I have 2 folders, the first:
C:\folder1
C:\folder1\subfolder\a.txt
C:\folder1\subfolder\b.txt
and the second:
C:\folder2
C:\folder2\subfolder\a.txt
I would like to merge them like so:
C:\folder2
C:\folder2\subfolder\a.txt (folder 2's a.txt)
C:\folder2\subfolder\b.txt
Description of what I want:
Is there a simple DOS command to copy all of the folders, subfolders and files from folder1 TO folder2, but if something exists in folder2 I do not want to overwrite it. If folder 1 has files that do not exist in folder2, I want them to be copied in.
Note: both folder1 and folder2 share common subfolder names.
Note 2: Folder2 is several TB's so I really have to copy into folder 2. Folder1 is only several GB.
I can't do this in windows explorer because there is no option to say overwrite files? No to all.
Yes, the robocopy.exe resource kit utility I think was made part of the OS with Windows 2003. You can specify all sorts of options as to what gets overwritten or not.
By default, robocopy won't overwrite same files, just newer versions over old - it's a folder syncing tool, mainly.
If you want to avoid any sort of overwrite, this might work,
where,
I recommend you test first with these additional switches,
where,
You could use the /Y switch of XCOPY or use ROBOCOPY ("Robust File Copy for Windows" as part of the Windows Server 2003 Resource Kit Tools), which by default overwrites without asking for confimation.
Another nice option is to install rsync on the Windows machine, and you get all sorts of great functionality. DeltaCopy is one tool based on rsync: http://www.aboutmyip.com/AboutMyXApp/DeltaCopy.jsp
You could also just use explorer to copy the contents of folder2 to folder1 (or to a copy of folder1). In that case you can overwrite existing files in folder1 and therefore files in folder2 'win'.
Am i missing something?