Windows Command-Line – List Largest Files Exceeding Specific Size

command linedisk-spacewindows

Would like to be able to find full paths of files in a directory tree that exceed a specific size (say 10MB).

Currently aware of Microsoft's Diruse (part of Windows XP Service Pack 2 Support Tools) which does what I want except it only lists directory sizes rather than files.

Best Answer

forfiles /P D:\ /M *.* /S /D +"01/17/2012"  /C "cmd /c if @fsize gtr 209715200 echo @path @fsize @fdate @ftime"

will scan D:\ and its sub-directories, look for all files whose last modified dates are greater than "17-JAN-2012" and whose sizes are greater than or equal to 200MB, then print their details.

forfiles is included on some Windows Servers, but not by default on Windows XP. You can extract it from the "Windows Server 2003 Resource Kit" download at http://www.microsoft.com/download/en/details.aspx?id=17657 (althou it says is for Windows Server, it runs on Win XP without problems).