Created
February 4, 2021 07:19
-
-
Save mattia72/7a4e710d37eb8a2d4dc03c258815bee2 to your computer and use it in GitHub Desktop.
Sort list of files by length and save it to another list with PowerShell
This file contains 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
Get-Content .\file-list.txt | | |
Get-Item | | |
Sort-Object Length | | |
Select-Object length,fullname | | |
Format-Table -AutoSize | | |
Out-File .\file-list-sorted-by-length.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment