I would like to create a windows batch file to combine a folder full of CSV's into one CSV file but by column, not at the end.
file1.csv
A, B
1, 2
3, 4
5, 6
...
fileN.csv
C, D
1, 2
3, 4
5, 6
results.csv
A, B, C, D
1, 2, 1, 2
3, 4, 3, 4
5, 6, 5, 6
All of the examples I have seen combine 2 files with a defined name, or a simple copy one after the other. I cannot find how to copy by column!
I modified the solution I posted at merge-several-csv-file-side-by-side-using-batch-file topic in order to merge several files selected via a wild-card (instead of files given in the parameters). This solution can process a "variable number of files", but just a maximum of 8 files can be merged into another one; if there are more than 8 files, several "merged files" will be created with up to 8 files each in "mergedFiles" folder. If you want to generate one file from more than 8 files, you must repeat the process with the files in "mergedFiles" folder.