How to see a list of Windows folders sorted by size

If you are like me, you at some point got use to some basic Unix utilities like good old ‘du’ (directory usage).  And you may like I be wondering how to do the same sort of thing in windows?

You could also be asking yourself why you would need to do this?  Well, lots of times, smaller C:\ partitions start getting full, and you want a way to easily tell which are the big space hogs.  Well what seems to be a simple procedure has no real easy built in method in windows XP and earlier (I haven’t checked Vista).

What, you want to be able to call this from a script or batch file as well?  Ok, well MS delivered us something called diruse.  This came with the Windows 2000 Resource Kit, as something called Disk Usage (Diruse.exe).

Here is the link to download.

Though its pretty simple and ONLY a command line utility, it’s not nearly as fast as du on Unix, so be prepared to wait, especially if you have that spanking new 1TB drive that’s near full….

Here are some of the common ways I run it:

Get a listing of the subdirectories sized in MB sorted largest first:

diruse /* /M /, "C:\"|sort /R

output:

image thumb4 How to see a list of Windows folders sorted by size

Get a listing for a remote file system:

diruse /* /M /, "\\servername/sharename/directory"|sort /R

image thumb5 How to see a list of Windows folders sorted by size

 

Get just a total for the directory (useful in scripts or batch files):

diruse /M /, "C:\Program Files"

image thumb6 How to see a list of Windows folders sorted by size






bookmark How to see a list of Windows folders sorted by size



Related posts:

  1. Server 2008, Windows Live Writer and Desktop blogging clients – oh my!
  2. New Maps added!!

This entry was posted in software and tagged , , , , , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*