Avatar of Jim Metcalf
Jim Metcalf
Flag for United States of America asked on

folder with many csv files... want to combine

can someone tell me how to combine a folder with about 100 csv files
powershell would be great...
id like the script to not care what the name of the files is
Powershell

Avatar of undefined
Last Comment
yo_bee

8/22/2022 - Mon
yo_bee

Do you want to read each file into a single csv file?
Do all the csv files have the same columns?
Jim Metcalf

ASKER
yes
one big csv file
yes they do have the same columns
ASKER CERTIFIED SOLUTION
yo_bee

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Jim Metcalf

ASKER
could you write the cmd for me

the files are going to be    
in c:\files
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
yo_bee

all you need to do is replace G:\Documents\TestFolder with c:\files.  
Where do you want the output to go?

GCI -Path c:\files -Filter *.csv | %{Gc -Path $_.fullname | Select -Skip 1 | ac Test.csv}

Open in new window