Does anyone know of a free command-line tool or script that calculates the size of a directory including all subdirectories?
It needs to be compatible with Windows 7, work with hard links and junctions and gracefully deal with access denied to some subfolder (i.e. continues in such a case).
I could not find anything and am thinking of writing my own tool.
Update:
I am looking for something to analyze (many) roaming user profiles stored on a file server. The perfect tool would make it easy to find the largest profile directories or those with the most files.
Best Answer
Du by Sysinternals might be what you're looking for. It's free from Microsoft, and it's basically a rudimentary version of the *ix du. It deals with junctions and denied permissions by reporting the file doesn't exist.
http://technet.microsoft.com/en-us/sysinternals/bb896651