is there a (powershell?) script to merge all CSV files in a folder that works for a job folder in Switch?
In my case the CSV files have no headers.
SwitchJobFolder "customername" containing customername.csv, customername_1.csv, customername_2.csv etc. -> merge to "customername.csv".(Like the "Merge PDF" Tool in Switch!)
the command prompt approach is really simple and efficient, but only if you dont have headers in each csv file. AFAIK there is a command to strip the first line of a file, but i can't remember it. But if you have a file with only the headers, you could combine the csv's without header first, and then add the header in a second copy command. This way you can control that the header comes first(it copies alphabetically) because you define the output .csv filename in the first copy command.
sander wrote: ↑Fri Jul 13, 2018 12:02 pm
Laziest approach I can think of:
"copy *.csv combined.csv" via command prompt @ Windows.
Thanks sander! This was my first attempt, but Switch would have to pass the path of the job folder to the .bat file. At the same time I should be able to pass the output path.
Maybe something like "copy %1/*.csv %2/merged.csv"?