Computer Hope
Microsoft => Microsoft DOS => Topic started by: nubia on February 17, 2009, 09:12:09 PM
-
I've looked at all the Dos Commands at http://www.computerhope.com/overview.htm (http://www.computerhope.com/overview.htm)
and don't seem to be able to find out how to get the size of a Windows directory.
Does anyone know if this is possible?
-nubia
-
dir
the size is listed at the bottom of the listing.
-
I see at the bottom what it says but this in no way matches what I get when I use Windows explorer and click properties for the selected folder. In the case of C:/Program Files typing 'Dir' at the command prompt I get
53 files 5,571,605 bytes
108 dirs 17,156,722,688 bytes free
And in Windows Explorer I get:
5.65 GB (
Contains 61,614 files 6,636 folders.
-What Gives??
-
I don't understand oll this DOS stuff,
So I go for the hardware solution.
You get a new blank Hard drive.
Notice how mush space is taken and how much is available.
Now copy the whole directory to the new drive.
Now notice again how much space is use. :o
From that you can deduce how big the directory is.
Now this, Isn't that a lot easier than
trying to get an answer from these guys?
-
Ha Ha very funny-not really..but seriously though..
-
Folder Size. Folder properties.
(http://geek9pm.com/folder_size.png)
Does that help?
-
5,571,605 bytes~=5.65 GB
Where is the problem?
-
5,571,605 bytes~=5.65 GB
Where is the problem?
thats 5 MB silly.
try Dir /S instead.
-
thats 5 MB silly.
Bed time, I guess ;D
-
thats 5 MB silly.
Bed time, I guess ;D
Yep.
-
Try
dir C:\Windows /a /s
which should match either very close, or exactly ... depending on what Windows is doing and how close together you run the DIR and the Explorer Properties.
-
Whew! I did the Dir /s on C:/Program Files and it went on forever! (Well several minutes anyway!)
But yes the results were right on.
Thank you all.
N.
-
Whew! I did the Dir /s on C:/Program Files and it went on forever! (Well several minutes anyway!)
But yes the results were right on.
Thank you all.
N.
Happened to me too ^_^.
-
If it's a NTFS drive you can use
FSUTIL VOLUME DISKFREE C:
-
But FSUTIL won't tell you a directory size.
-
Oops. ;D
-
The du utility from the Windows 2000 Resource kit is handy.
S:\>du /q pdf-dir
Files: 10
Directories: 8
Size: 5,670,819 bytes
Size on disk: 5,670,819 bytes
S:\>for /f "tokens=1-3" %A in ('du /q pdf-dir ^| find "Size:"') do @echo %B %C
5,670,819 bytes
-
I guess I don't have du.
C:\>du /q program files dir
'du' is not recognized as an internal or external command,
operable program or batch file.
-
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...
-
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?
-
Because we're Human...
-
I guess I don't have du.
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.
S:\>du /q pdf-dir
Files: 10
Directories: 8
Size: 5,670,819 bytes
Size on disk: 5,670,819 bytes
S:\>for /f "tokens=1-3" %A in ('du /q pdf-dir ^| find "Size:"') do @echo %B %C
5,670,819 bytes