Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@jkbryan
Last active October 2, 2018 20:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jkbryan/87f23080e5916f7bd191c0d85c6617c4 to your computer and use it in GitHub Desktop.
Save jkbryan/87f23080e5916f7bd191c0d85c6617c4 to your computer and use it in GitHub Desktop.
powershell-sort-files
$Path = "<PathToWhereYourOutputFilesAre>"
$SortPath = "<PathToYourSortedFiles>"
$AllGroups = get-childitem $Path
ForEach ($Group in $AllGroups)
{
Write-Host $Group
$GroupFile=Get-Content $Path\$Group | sort-object | Out-File -Filepath $SortPath\$Group
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment