This little trick is easy and useful and doesn’t require any programming experience to do it.
Create a New Empty Folder
1 — Open up finder on Mac and create a new folder somewhere, maybe /Download/_merge but probably not on your desktop.
NOTE: Everything in this folder get’s combined after you run this script, just so you are aware.
2 — Copy all the CSV’s you want to merge into this folder. Remember, CSV’s will have a single tab vs. Excel files could have multiple tabs. And the columns should be the same. In other words, it won’t work so well if you try to combine two CSV’s that are completely different formatting. So make sure the CSV’s are the same, like this:
Open up “Terminal” Program on Mac
NOTE: You may not be familiar with this program, and it looks a little scary, but don’t worry, it’s easy.
1 — Terminal is located in your “Applications” folder, but you can also open it quickly by pressing CMD + Space Bar to open Mac’s built in Spotlight Search feature and typing “Terminal”
2 — Terminal looks like this, but will have your computer name and user information in the spot where i’ve blacked out the text below.
3 — Now your have to tell Terminal to go to the newly created empty folder. Just type in the path to the folder you created and click return. If you created it in /downloads as suggested, this is easy. If you created it deeper in your file directory, it can sometimes be a little difficult to find the actual folder path,
Run the Merge Script in Terminal
1 — Now that you have Terminal in the correct folder, you can run this simple script that is built in to Mac to merge the files into one!
Type: cat *.csv >combined.csv
2 — Check your _merge folder, it should have a new file called combined.csv