If you have a script or command that you are running you may want to merge folders. You could try and do this with the copy command, however you could run into problems. If you want a simple and easy way to merge files you can do this with something called the “ditto” command within Terminal. It doesn’t take very much configuration and is a quick and easy way to merge files.
To use the ditto command, open up Terminal and type something similar to the following:
ditto Folder1 Folder2
Where Folder1 is the path to the first folder, and Folder2 is the path to the folder where you want the files from Folder1 to go. If you want a practise set up some test folders and have a play round. Its a very simple and easy to use command which can be very useful when you have a script where you need to merge plenty of folders together.