Append all .csv files

Microsoft Office 2003 professional oem
July 22, 2010 at 11:57:30
Specs: Windows XP
I need a Batch file that will merge / combine / append all the .CSV files in the current directory together with only one header row. The header row is the same in each file and is the first row of each file.
How can I add the first file as it is and then add all the others to it without the first row?

See More: Append all .csv files

Report •

July 22, 2010 at 17:38:05
download gawk for windows(see my sig) and use this one liner

c:\test> gawk "FNR==1&&!f{print;f=1}FNR>1&&f " *.csv > all.csv

GNU win32 packages | Gawk

Report •

July 26, 2010 at 12:18:36

What this: "FNR==1&&!f{print;f=1}FNR>1&&f " *.csv > all.csv"

do? I never use Gawk. Can you tell a little bit more about this command?

Report •

July 26, 2010 at 17:27:46

Report •
Related Solutions

Ask Question