Introduction
There may be instances where two or more downloaded csv
files have information that you need. For instance, at the start of the calendar year we have members that are current with their national and local chapter dues, however, they have not signed a current Chapter Membership Enrollment Form and Release. HOGScan shows these members as Expired.
We at Raleigh HOG do not want to keep these members from receiving campaigns such as Monthly Meeting announcements, Upcoming Rides et cetera so it is necessary to combine the exported Current Members and Expired Members lists for use in the Mailer.
There are a few ways to combine multiple files into one file;
- Merge
CSVs
at the command line (which this tutorial will show)
- Merge
CSVs
with a csv combine tool
- Merge
CSVs
with Python
- Merge
CSVs
by smashing them together with Hulk hands
MacOS
- Use the
mkdir
command to create a new folder and place the exported csv
files into it (mine is in the Downloads
directory and I called it combine
)
Caution: Everything in this folder will be combined so ensure it only contains the current files you need
- Open a Terminal window (aka "the command line" or "the shell")
If you haven't already set a shell up, the program "Terminal" is located in your "Applications" folder under "Utilities" (Applications > Utilities > Terminal)
Double click to open it
- Print Working Directory
Run the
pwd
command to show the directory you are currently working in
- Choose the folder you created
Use the
cd
command to switch to the directory you placed the csv
files in (for me they are in Downloads/combine
)
- Merge the files by running the following command;
cat *.csv >combined.csv
- Check the folder. There will be a file called
combined.csv
which contains the csv
files combined together.
Note: You will have to delete the duplicate columns header
Optionally, if you do not want to follow these steps, you can use the CSV Combiner Tool mentioned in the Introduction and Windows sections.
Windows
The Windows OS does not recognize the cat
command. If you're working in this environment just click this link for a CSV Combiner Tool
This is just one tool. You can Google for others but I tried this one and found it to be simple and easy to use.