Merge .txt & .csv
- DarkLight
Merge .txt & .csv
- DarkLight
Article summary
Did you find this summary helpful?
Thank you for your feedback
This article explains explains how to merge CSVs, this is a for advanced users as it require to use the terminal. This can be useful when you have many files to import that have the same format, for example reports split by artists or if you would like to merge all
Merge .txt or .csv with MAC OS
set-up terminal at folder shortcut
- open finder
- Click Finder > Services > Services Settings
- In the files and folder section; tick New terminal at Folder
Merge TXT files:
Create a new folder in finder
Move all CSVs to merge within the newly create folder
⚠️ make sure reports in the folder are from the same royalty source and periodOpen the terminal from a folder
In the terminal, paste the following query:
awk '(NR == 1) || (FNR > 1)' *.txt > mergedstatements_month_year.txt
a .txt file will be created in the folder with all the data merged into a single file. To avoid any confusion, rename the file with the relevant month and year.
Merge CSV files:
- Create a new folder in finder
- Move all CSVs to merge within the newly create folder
⚠️ make sure reports in the folder are from the same royalty source and period - Open the terminal from a folder
- In the terminal, paste the following query:
awk '(NR == 1) || (FNR > 1)' *.csv > mergedstatements_month_year.csv
- a .csv file will be created in the folder with all the data merged into a single file. To avoid any confusion, rename the file with the relevant month and year.
Was this article helpful?