I have many CSV. files that I want to combine into one big one, further to that, I also need to keep the File Name in Column 2.
Contents of my CSV file
File Name ABNK102455
Column A
12/215425
12/125485
12/215435
File Name ABNK102456
Column A
12/215425
12/125485
12/215435
Result
Combined.CSV
Column A
12/215425 ABNK102455
12/125485 ABNK102455
12/215435 ABNK102455
12/215425 ABNK102456
12/125485 ABNK102456
12/215435 ABNK102456
Is this possible, and How?
You would need to change the setting of
sourcedir
to suit your circumstances.I used a files named
q26135599-1.csv
andq26135599-2.csv
containing your data for my testing. You would need to adjust the setting ofmask
to suit.Produces newfile.txt
Best not to try to create
newfile.txt
as a.csv
within your source directory, unless you're really sure that it won't be included in%mask%
.To get you going ....