Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.