PowerShell: list large files 📜
List Large Files
function xah-list-large-files { # .DESCRIPTION # list top 200 biggest files in current dir, recursively # .EXAMPLE # # .EXAMPLE # # .INPUTS # # .OUTPUTS # # .NOTES # Created: 2024-10-18 # Version: 2025-09-10 # .LINK # PowerShell: List Large Files # http://xahlee.info/powershell/powershell_list_large_files.html dir -Recurse -file | sort -Descending -Property length | select -First 200 | ForEach-Object { Write-Host ("{0:n0} {1}" -f $_.length, $_.fullname ); } }