Created
January 12, 2018 14:17
-
-
Save deldersveld/2b8f61bf08095812ccb02a426f30c193 to your computer and use it in GitHub Desktop.
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
$getFirstLine = $true | |
get-childItem "[path]\*.tsv" | foreach { | |
$filePath = $_ | |
$lines = $lines = Get-Content $filePath | |
$linesToWrite = switch($getFirstLine) { | |
$true {$lines} | |
$false {$lines | Select -Skip 1} | |
} | |
$getFirstLine = $false | |
Add-Content "[outputpath]\[filename].tsv" $linesToWrite | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment