joehuang
asked on
How to Display Folder size ?
IS there any way to see the size of folder in either CMD> and Windows Explorer without the contents/files ?
Please Advise
Please Advise
Not from the command prompt - no
As far as I'm aware, u can only list folder size from windows explorer by checking the folder properties.
As far as I'm aware, u can only list folder size from windows explorer by checking the folder properties.
Put this in a cmd file.
Pass it the name of the directory you're interested in.
@echo off
dir /s %1 | find "File(s)" >a.a
for /F "tokens=1-4 delims= " %%a in (a.a) do (
set XXX=Files:%%a Total Size:%%c
)
del a.a
echo %1 : %XXX%
Pass it the name of the directory you're interested in.
@echo off
dir /s %1 | find "File(s)" >a.a
for /F "tokens=1-4 delims= " %%a in (a.a) do (
set XXX=Files:%%a Total Size:%%c
)
del a.a
echo %1 : %XXX%
Cookre,
that even works!
well, nearly works.
if you were to use a dir /s/a-d then the filecount would be better. Unfortunately, it'll still be off by 1 because the file 'a.a' will be included in the count, but it's not there before or after.
...Bill
that even works!
well, nearly works.
if you were to use a dir /s/a-d then the filecount would be better. Unfortunately, it'll still be off by 1 because the file 'a.a' will be included in the count, but it's not there before or after.
...Bill
...though, of course the filecount SHOULD be accurate if your logged directory is not included in the tree on which you are reporting.
...Bill
...Bill
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Is this what you require?