Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there any way to calculate, and breakdown, average file sizes for a given directory (or drive)?

Something that can give details such as:|

  • Files of 4KB - 22KB: account to 20% of all files
  • Files of 32KB - 64KB: account to 10% of all files
  • Files of 1MB - 20MB: account to 70% of all files

And so on.

Perhaps you know of a utility that can do that?

share|improve this question

You can do this pretty easily in Powershell

$foo = (Get-ChildItem -path "c:\your\file\path" -recurse | measure-object | select -expand Count)

$bar = ((Get-ChildItem -path "c:\your\file\path" -recurse | Measure-Object -property length -sum).sum /1MB)

$avrg = $bar / $foo

$avrg

Output example:

PS X:> $avrg

1.03643417358398

share|improve this answer

Someone over at Seven Forums pointed me out to Agent Ransack from Mythicsoft:

http://www.mythicsoft.com/page.aspx?type=agentransack&page=home

Had to make the calculations on my own but it wasn't so bad.

share|improve this answer

Maybe this is helpful?

It is slow but acurate, don't know for shure if it avarages files in a directory.

share|improve this answer
    
Thanks but I have already tried it. It doesn't report the information I need - the closest it get's is dividing the folder contents by file extension which is irrelevant for me – pilau Nov 1 '12 at 12:47

I just used total commander (shareware) and microsoft excel to do that in 2 minutes.

In Total Commander go to the root of C: (or any drive you like) click Ctrl+B, which lists all files within all subdirectories in one place. From Mark menu item, click "Copy to clipboard with all details" and paste into excel... you now have a long list of items with their file sizes, sort and count to your hearts content. You can also Google "histogram in Excel" for a nicer output.

What I ended up with on a one-year-old Windows 8.1 system is shown below (sizes are in bytes, and the x axis figures are my defined range). As one can see majority of my files are around 1k range.

The x axis figures are my defined range

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .