isthisthewaywego
New Member
- Joined
- Apr 22, 2014
- Messages
- 3
Hi,
I have about 4000 csv files, all with about 10 lines of data in them. Each file has the same headers, and each has its own individual file name. I would like to combine these files into one big csv file, but adding a different column which specifies, next to each line of data, the name of the file that the data was originally sourced from.
So if example1.csv had the following contents:
ProductCode,Price,Quantity
WidgetA,10,2
And example2.csv had the following contents:
ProductCode,Price,Quantity
WidgetA,8,4
I would like the combined file to be as follows:
ProductCode,Price,Quantity,<wbr>OriginalFile
WidgetA,10,2,example1.csv
WidgetB,8,4,example2.csv
Anyone have any ideas as to how I might go about this?
Cheers!
Dan
I have about 4000 csv files, all with about 10 lines of data in them. Each file has the same headers, and each has its own individual file name. I would like to combine these files into one big csv file, but adding a different column which specifies, next to each line of data, the name of the file that the data was originally sourced from.
So if example1.csv had the following contents:
ProductCode,Price,Quantity
WidgetA,10,2
And example2.csv had the following contents:
ProductCode,Price,Quantity
WidgetA,8,4
I would like the combined file to be as follows:
ProductCode,Price,Quantity,<wbr>OriginalFile
WidgetA,10,2,example1.csv
WidgetB,8,4,example2.csv
Anyone have any ideas as to how I might go about this?
Cheers!
Dan