title: Windows Dir command - order subdirectories by size
body: <p>How could I display the subdirectories of a folder from largest to smallest using the dir command?</p>
  
  <p>I've tried using <code>dir /O:-S</code> command, and although it sorts files just fine, it doesn't seem to order the subdirectories.</p>
  
  <p>Ideally, the command should be able to go down several levels; some of these sub-folders have their own folders. For example:</p>
  
  <pre><code>D:/
  |-- Folder 1
      |-- Subfolder 1
      +-- Subfolder 2
          |--Another folder
  +-- Folder 2
  </code></pre>
  
  <p>Suppose 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?</p>
  
  <p>I.e.</p>
  
  <pre><code>94932485 Folder 2
  6453445  Folder 1
  </code></pre>
  
  <p>Thanks in advance!</p>