Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: How to determine directory size?  (Read 8965 times)

0 Members and 1 Guest are viewing this topic.

BC_Programmer


    Mastermind
  • Typing is no substitute for thinking.
  • Thanked: 1140
    • Yes
    • Yes
    • BC-Programming.com
  • Certifications: List
  • Computer: Specs
  • Experience: Beginner
  • OS: Windows 11
Re: How to determine directory size?
« Reply #15 on: February 19, 2009, 02:24:36 PM »
Oops.  ;D
I was trying to dereference Null Pointers before it was cool.

Dias de verano

  • Guest
Re: How to determine directory size?
« Reply #16 on: February 19, 2009, 03:44:21 PM »
The du utility from the Windows 2000 Resource kit is handy.

Code: [Select]
S:\>du /q pdf-dir
Files:        10
Directories:  8
Size:         5,670,819 bytes
Size on disk: 5,670,819 bytes


Code: [Select]
S:\>for /f "tokens=1-3" %A in ('du /q pdf-dir ^| find "Size:"') do @echo %B %C
5,670,819 bytes

nubia

    Topic Starter


    Rookie

    Re: How to determine directory size?
    « Reply #17 on: February 20, 2009, 06:51:32 PM »

    I guess I don't have du.

    Code: [Select]
    C:\>du /q program files dir
    'du' is not recognized as an internal or external command,
    operable program or batch file.


    patio

    • Moderator


    • Genius
    • Maud' Dib
    • Thanked: 1769
      • Yes
    • Experience: Beginner
    • OS: Windows 7
    Re: How to determine directory size?
    « Reply #18 on: February 20, 2009, 07:36:21 PM »
    Keep in mind here that directory/drive/ and folder sizes will all be reported differently depending on the reporting agent itself...
    This is commonly known as computer chaos and is built into every machine ever assembled...
    " Anyone who goes to a psychiatrist should have his head examined. "

    Geek-9pm


      Mastermind
    • Geek After Dark
    • Thanked: 1026
      • Gekk9pm bnlog
    • Certifications: List
    • Computer: Specs
    • Experience: Expert
    • OS: Windows 10
    Re: How to determine directory size?
    « Reply #19 on: February 20, 2009, 08:13:26 PM »
    Quote
    This is commonly known as computer chaos and is built into every machine ever assembled...
    Right!
    Now I would like to know what is it about us humans that this bothers us so much. This question comes up again and again. Why do people become agitated because the machine can not  provide a precise status report?

    patio

    • Moderator


    • Genius
    • Maud' Dib
    • Thanked: 1769
      • Yes
    • Experience: Beginner
    • OS: Windows 7
    Re: How to determine directory size?
    « Reply #20 on: February 20, 2009, 08:26:36 PM »
    Because we're Human...
    " Anyone who goes to a psychiatrist should have his head examined. "

    BC_Programmer


      Mastermind
    • Typing is no substitute for thinking.
    • Thanked: 1140
      • Yes
      • Yes
      • BC-Programming.com
    • Certifications: List
    • Computer: Specs
    • Experience: Beginner
    • OS: Windows 11
    Re: How to determine directory size?
    « Reply #21 on: February 20, 2009, 08:32:18 PM »

    I guess I don't have du.

    Code: [Select]
    C:\>du /q program files dir
    'du' is not recognized as an internal or external command,
    operable program or batch file.



    The du utility from the Windows 2000 Resource kit is handy.

    Code: [Select]
    S:\>du /q pdf-dir
    Files:        10
    Directories:  8
    Size:         5,670,819 bytes
    Size on disk: 5,670,819 bytes


    Code: [Select]
    S:\>for /f "tokens=1-3" %A in ('du /q pdf-dir ^| find "Size:"') do @echo %B %C
    5,670,819 bytes
    I was trying to dereference Null Pointers before it was cool.