Skip navigation

JSI Tip 4648. How can I display the size of a folder and each first level sub-folder?

Using Diruse:

diruse /* /, "C:\Documents and Settings"

    Size  (b)  Files  Directory
      1,651,270    196  SUB-TOTAL: C:\DOCUMENTS AND SETTINGS\Administrator
     10,030,747    242  SUB-TOTAL: C:\DOCUMENTS AND SETTINGS\All Users
        630,307     81  SUB-TOTAL: C:\DOCUMENTS AND SETTINGS\Default User
 . . . . . . . 
    205,134,007  14784  SUB-TOTAL: C:\DOCUMENTS AND SETTINGS\Jerry
        480,506     93  SUB-TOTAL: C:\DOCUMENTS AND SETTINGS\UltraBac
    221,187,509  15630  TOTAL
NOTE: The above the total space of all files and sub-folders.

The complete syntax is:

diruse \{/s | /v\} \{/m | /k | /b\} \[/c\] \[/,\] \[/q:# \[/l\] \[/a\] \[/d\] \[/o\]\] \[/*\] \[DirList\]


/s Includes subdirectories of the specified directories in the output.

/v Writes progress reports while scanning subdirectories. The /v is ignored if /s is specified.

/m Displays disk usage in megabytes.

/k Displays disk usage in kilobytes.

/b Displays disk usage in bytes (default).

/c Uses compressed file size instead of apparent file size.

/, Displays the thousands separator (comma or period) in file sizes.

/q:# Marks directories that exceed the specified size (#) with an exclamation point (!). If /m (megabytes) or /k (kilobytes) is not specified, the size is assumed to be in bytes. If /q is specified and any directory is found that exceeds the specified size, then the return code is Otherwise the return code is ZERO zero

/l Writes overflows to the log file diruse.log in the current directory.

/a Specifies that an alert is generated if sizes specified by /q:# are exceeded. The Alerter service must be running, and the alert appears only when you are using DirUse.

/d Displays only directories that exceed specified sizes.

/o Specifies that subdirectories are not checked to see if they exceed the specified size.

/* Uses the top-level directories residing in the specified DirList.

DirList Specifies a list of directories to check. DirList is required. Use semicolons, commas, or spaces to separate mutliple directories.

Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.