Blog Post

Merge csv files – quick PowerShell snippet

,

csvDuring a bit of work I’ve been doing this evening for SQLRelay, I used something I have in my arsenal of PowerShell scripts which I thought I’d share because I love it’s simplicity. It’s nothing big and fancy but something that is extremely useful. Tasked with merging a large number of csv files there (as always) is a quick and easy way to do this with PowerShell:

Get-ChildItem *.csv | ForEach-Object {Import-Csv $_} |
Export-Csv -NoTypeInformation WhateverYouWantToCallTheFile.csv

POSH_CSV

There are ways to make this a little more dynamic which I will update the post with in the coming weeks….

 

 

Rate

You rated this post out of 5. Change rating

Share

Share

Rate

You rated this post out of 5. Change rating