Get folder size from command?

Archived from groups: microsoft.public.windowsxp.perform_maintain (More info?)

Howdy-

Is there any way to get the size of a single folder from the command
line? I know diruse can search/display within a tree, but I'd like to
be able to get size information for specific folder without having to
use Explorer... Maybe a third-party tool?

TIA,
BM
2 answers Last reply
More about folder size command
  1. Archived from groups: microsoft.public.windowsxp.perform_maintain (More info?)

    Hi,
    I'm not too clear on what you want to do, but, assuming you want a command
    line utility to display size of the folder EXCLUDING subfolders (otherwise
    why would you dismiss diruse?), you can:
    1. use DU -n from sysinternals:
    http://www.sysinternals.com/utilities/du.html
    2. use batch (use dir), see this one for example
    http://www.robvanderwoude.com/files/diskuse2k.txt - just modify it to
    remove calculations of subfolders.

    "Brian MXP" <brian@nospam.broad.mit.edu> wrote in message
    news:uVRR$KQmFHA.1480@TK2MSFTNGP10.phx.gbl...
    > Howdy-
    >
    > Is there any way to get the size of a single folder from the command line?
    > I know diruse can search/display within a tree, but I'd like to be able to
    > get size information for specific folder without having to use Explorer...
    > Maybe a third-party tool?
    >
    > TIA,
    > BM
  2. Archived from groups: microsoft.public.windowsxp.perform_maintain (More info?)

    Mak wrote:
    > Hi,
    > I'm not too clear on what you want to do, but, assuming you want a command
    > line utility to display size of the folder EXCLUDING subfolders (otherwise
    > why would you dismiss diruse?), you can:
    > 1. use DU -n from sysinternals:
    > http://www.sysinternals.com/utilities/du.html
    > 2. use batch (use dir), see this one for example
    > http://www.robvanderwoude.com/files/diskuse2k.txt - just modify it to
    > remove calculations of subfolders.
    >
    > "Brian MXP" <brian@nospam.broad.mit.edu> wrote in message
    > news:uVRR$KQmFHA.1480@TK2MSFTNGP10.phx.gbl...
    >
    >>Howdy-
    >>
    >>Is there any way to get the size of a single folder from the command line?
    >>I know diruse can search/display within a tree, but I'd like to be able to
    >>get size information for specific folder without having to use Explorer...
    >>Maybe a third-party tool?
    >>
    >>TIA,
    >>BM
    >
    >
    >
    Mak-

    You were right; I do get what I need with diruse. I had been so used to
    running diruse to loop through directories for specific-sized folders
    that I forgot it could be used to display single (I did want sub-dirs,
    too) folder sizes...

    c:\temp>diruse <foldername> /m

    gave me what I wanted (in Megabytes)

    Thanks,
    Brian
Ask a new question

Read More

Command Prompt Microsoft Windows XP