title: powershell folder stats
body: <p>I keep all modules of our system in one dir (e.g. <code>All\ModuleA; All\ModuleB</code>). I want to see what types of files are most numerous and take up the most space, by module. So, I'd like output along the lines of:</p>
  
  <pre><code>ModName,java-count,java-size,xml-count,xml-size,png-count,png-size...
  ModuleA,30,0.2,100,2.3,0,0,...
  ModuleB,21,0.1,20,0.7,1,1.2
  </code></pre>
  
  <p>Not all modules have files of all types, so this will only work if I list all types for all module (with lots of zeros).
  I have something that almost works, but it's hideous, verbose and inefficient. I'm sure someone can help me see the light :-) (which, by the way, can be a piece of freeware software that does this out of the box; I only chose to do this in powershell out of interest). </p>
  
  <p>thanks</p>