Created
July 22, 2021 00:25
-
-
Save DCCoder90/727b413ed7c51f5bce8f2d947999a15c to your computer and use it in GitHub Desktop.
Combine all CSVs in directory to single CSV
This file contains hidden or 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
$CSVFolder = 'C:\path\to\directory\with\csvs'; | |
$OutputFile = 'C:\path\to\combined.csv'; | |
$CSV = Get-ChildItem -Path $CSVFolder -Filter *.csv | ForEach-Object { | |
Import-Csv -Path $_ | |
} | |
$CSV | Export-Csv -Path $OutputFile -NoTypeInformation -Force; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment