

If you want it prettier: switch((ls -r|measure -sum Length). I searched online, there are some 3rd party tools or explorers can do this. Furthermore it will likely count symlinks and junctions multiple times so it's at best an upper bound, not the true size (you'll have that problem with any tool, though).Īn alternative is PowerShell: Get-ChildItem -Recurse | Measure-Object -Sum Length Just wondering that if there is a way to display the size of folder in size column inside of windows explorer by default, it only display the size of a file, you have to use right click and properties or other way to check the size of a folder. So it will get sizes above 2 GiB wrong 1.

However, this has several problems because cmd is limited to 32-bit signed integer arithmetic. You can just add up sizes recursively (the following is a batch file): offįor /r %%x in (folder\*) do set /a size+=%%~zx
