Created
November 17, 2016 09:52
-
-
Save conrjac/9fa3f00305cfb8503654faf86b565902 to your computer and use it in GitHub Desktop.
Powershell Script to merge multiple CSV files into one (by appending each file to the end)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$files = Get-ChildItem [INPUT FOLDER PATH - e.g C:\Data\]*.csv | |
Get-Content $files | Set-Content [OUTPUT FILE PATH - e.g C:\Data\MergedCsvFile.csv] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have several CSV files: file1.csv file2.csv file2.csv .... they all have the same columns, I need a powershell script to combine them together into one csv file, I found many PW scripts, but yours is the easiest to understand and the simplest to fit my need, Thank you so much. Keep up the good works. I will visit this site very often as I have more PW scripts to write.