Recommend me a tool to 'merge' folders

I am looking for a tool that does the following. Given 2 folders with the same name, say:

c:/1/files/
c:/2/files/

I wish to copy all files in 1/files to 2/files quickly. I am looking for a tool because there are numerous folders to ‘merge’, something like this:

c:/1/files1/
c:/1/files2/
c:/1/files3/
c:/1/filesN/
c:/2/files1/
c:/2/filesN/

Any recommendation?

I could be mis-interpreting your request here, but surely if you just copy the directory from c:\1 to c:\2 windows ‘merges’ them for you. So the end result of

copy c:\1\files1 c:\2

(not sure if the syntax is exactly correct there)

will be c:\2\files1 containing all of its original files plus all the files that were in c:\1\files1. Which is the very definition of a merge.

edit: If you want to perform a merge of everything in c:\1 with everything in c:\2 then one dos command should do it…

copy c:\1*.* c:\2

or in explorer you’d select all the directories and files in c:\1 (ctrl-a while you’re in the dir) and then drag them to c:\2, or right click and click ‘copy’ then go to c:\2 and right click and click ‘paste’.

I just tried what Losbang recommended with the Window Explorer and it works, giving me the option to merge; I didn’t realize you could do this in Windows 7, because in XP, as far as I can remember (or did I just assume?), copying the same a folder with the same name would just overwrite the existing folder and its content.

Or was I wrong all the while?

From what I remember, windows XP shouldn’t do that. It should merge, but any files that have the same name it would ask you if you want to overwrite them.

So all files that the two dirs did not have in common would be merged, and all files they did have in common would trigger the prompt “file already exists, would you like to overwrite?”

edit: Just to be clear - only files would trigger the overwrite prompt. Directories with the same name would be merged (all files in the source dir that do not exist in the destination dir would be joined with the files in the destination dir)

Thanks a lot; apparently that was something I never tried!

You’re welcome :slight_smile:

And Happy New Year!

And a word of warning, if you happen to be on a Mac: the Finder does not have this folder-merging behavior. It treats folders the same as folders when copying, in that it replaces instead of merges. (There are some good reasons for this, but that’s another thread.)

I’m intrigued. So Another thread I shall create.

http://boards.straightdope.com/sdmb/showthread.php?p=11944703#post11944703