Size

dir /O /S

Sort by size, recursive

forfiles /M *.docx /C "cmd /c echo @fsize @path"

Show size by file extension

dir /W /O /S | findstr ">100000"

Greater than 100KB, recursive

forfiles /S /C "cmd /c if @fsize gtr 55 echo @path"

Greater than 55 bytes, recursive

forfiles /S /M *.* /Q >1048576

Greater than 1 MB, recursive

Get-ChildItem "C:\path" -Recurse | Where-Object { $\_.Length -gt 55 }

Greater than 55 bytes (size in bytes), recursive

dir /W /O /S | FINDSTR "<100000"

Less than 100KB, recursive

forfiles /S /C "cmd /c if @fsize ! gtr 55 echo @path"

Less than 55 bytes, recursive (Not > 55), recursive

forfiles /S /M *.* /Q >1048576

Less than 1 MB, recursive

Get-ChildItem "C:\path" -Recurse | Where-Object { $\_.Length -lt 55 }

Less than 55 bytes (size in bytes), recursive

Last updated

Was this helpful?