PowerShell: Sort Files by File Size 🚀
List Large Files
function xah-list-large-files { # .DESCRIPTION # list top 20 biggest files in current dir, recursively # .EXAMPLE # # .EXAMPLE # # .INPUTS # # .OUTPUTS # # .NOTES # Created: 2024-10-18 # Version: 2024-10-18 # .LINK # PowerShell: List Large Files # http://xahlee.info/powershell/powershell_list_large_files.html dir -Recurse -file | sort -Descending -Property length | select -First 20 | ForEach-Object { Write-Output ("{0:n} {1}" -f $_.length, $_.fullname ); } }
PowerShell, List Dirs and Files
List Dirs
- PowerShell: Navigate Directory
- PowerShell: Show Current Dir Path
- PowerShell: List Directories
- Show Directory as Tree
- PowerShell: List Empty Dir 🚀
- PowerShell: Dir Size 🚀
List Files
- PowerShell: List Files
- PowerShell: Show Fullpath, No Truncate Lines
- PowerShell: List Empty Files
- PowerShell: Count Number of Files
- PowerShell: List Files by Name Pattern
- PowerShell: Filter File Name by Regular Expression
- PowerShell: List File by Size
- PowerShell: Sort Files by File Size 🚀
- PowerShell: List Files by Date Time
- PowerShell: Search Text in Files (grep)