How to sort folders in Win Explorer without 3rd party app?
I have thousands of files nested within subfolders of subfolders. When I am in the root directory with a list of all my main folders, I want to be able to sort by size (largest main folder to smallest, dictated by the contents of its subfolders).
By default, Win Explorer only sorts individual files. Is there an easy way to change this behavior without a 3rd party app? Otherwise, I'd be happy with an AutoHotkey-oriented solution too.
Solution 1:
See here:
Windows 8.1, just like its predecessors, doesn’t show size of folders in Windows Explorer (File Explorer) by default. That is, when you open up a folder containing several files and folders, Windows Explorer shows only the size of files and not folders in Details view.
In order to view the size of a folder in Windows Explorer, one needs to either hover mouse cursor on the folder, or select the folder, right-click on it, and then click Properties (one can quickly open properties by using Alt + Enter hotkey).
You can sort by folder size in OSX, but unfortunately there's no built in way to do so in Windows.
So back to your question, I don't think there is any way to display folder size without a third party app. I guess the way without a 3rd party tool would be to right-click>Properties.
Related superuser question.
Freeware:
- Folder Size
Snapshot:
- Treesize
Snapshot:
See here for more.
Solution 2:
You can also do this with Windows Subsystem for Linux (WSL). Navigate to the folder, e.g. cd /mnt/c/myfolder
and enter the command du -hs * | sort -hr
. The output will look like this:
70M chapter04
30M chapter02
580K chapter03
48K chapter06
48K chapter01
36K chapter05
16K README.md
8.0K chapter07
0 requirements.txt