How To Sort Folders By Size

Posted on  by admin

It's impossible to sort the file size in Windows 10.I want to clean up my drive and to do that i need to see the biggest folders that are taking up the most space.But windows 10 classifies any folders larger than 16MB as 'unspecified',which is extremely dumb.Because it can only scan files with a file size maximum of 16MB - (which is extremely small - still called 'huge')I can't sort my files by size and i just get 156 files as 'unspecified' being randomly shuffled and i get only a few files that actually fit under 16MB to be properly sorted largest to smallest.

How to sort folders by sizeHow To Sort Folders By Size

Arrange Folders By Size

Folders

How could I display the subdirectories of a folder from largest to smallest using the dir command?I've tried using dir /O:-S command, and although it sorts files just fine, it doesn't seem to order the subdirectories.Ideally, the command should be able to go down several levels; some of these sub-folders have their own folders. For example: D:/ - Folder 1 - Subfolder 1+- Subfolder 2 -Another folder+- Folder 2Suppose the total size of Folder 1 (including all files in its subfolders) is 10GB, and that of Folder 2 is 15GB, how would I output their order sorted by total content size?I.e. 94932485 Folder 26453445 Folder 1Thanks in advance! If you are after a one-line solution, that supports upto 999 terabytes:cmd /v /c 'set zeropad=000,000,000,000,000,&for /f 'delims='%a in ('dir /ad /b') do @set bytes=!zeropad!000&(for /f 'tokens=3'%b in ('dir /s '%a' 2^NUL ^ find 'File(s)') do @set bytes=%b)& @for /f 'tokens=1. delims=,'%c in ('echo!bytes!' ) do @(set bytes=%c&@set bytes=000!bytes!&@set bytes=!bytes:-3!& @set bytes=!zeropad!!bytes!&if '%d' NEQ ' set bytes=!bytes!,%d) & @echo!bytes:-23!%a' sort /RAnd a bonus one-line solution if you want both files and directories cmd /v /c 'set zeropad=000,000,000,000,000,&for /f 'tokens=4. delims= '%a in ('dir ^ find '/' ^ findstr /E /V /R 'DIR^.$ DIR^.$') do @set bytes=!zeropad!000&(if '%a' EQU '^' (for /f 'tokens=3'%c in ('dir /s '%b' 2^NUL ^ find 'File(s)') do @set bytes=%c)) & (if '%a' NEQ '^' (set bytes=%a)) & (for /f 'tokens=1.

How To Sort Folders By Size Windows 10

delims=,'%d in ('echo!bytes!' ) do @set bytes=%d&@set bytes=000!bytes!&@set bytes=!bytes:-3!& @set bytes=!zeropad!!bytes!&if '%e' NEQ ' set bytes=!bytes!,%e)& echo!bytes:-23!%b' sort /R. EDITED: to display largest to smallest foldersSee if this is what you need. D:files is the target tree here. This is pretty old question but I don't know why my all friends answer that there is no such command. Here is the command:dir /o:sI saw comments that its not working on folders, for the same reason I am editing my answer. This command supports folders too.

Custom Sort Windows Folder

No @katzenhut. In one of my dir command dir /o:s gives below: -OUTPUT- 01-Jun-2016 05:37 PM binding removed lines as ans become too long 04-May-2016 12:20 PM PocJms 26-May-2016 12:01 PM repository 20-Apr-2016 12:58 PM 901 TestValidation.zip removed lines as ans become too long 05-May-2016 05:19 PM 12,442,322 WMQ 8 JARS.zip - As mentioned in output directory binding is of size 18 KB and repository 1GB, so it arranges subdir as well. Please check.–Jun 27 '16 at 8:34.