dir /totalsize

Dec 24, 2008
21
0
How do I do a dir on a directory (including it's subdirs) when all I want returned is the total size of that whole structure.

Thanks,
Jim
 

dim

Dimitry Andric
May 31, 2008
205
1
Netherlands
On 2009-02-23 18:18, jimklein wrote:

> How do I do a dir on a directory (including it's subdirs) when all I want returned is the total size of that whole structure.

dir /a /s /u2 targetdir

or

echo %@filesize[/s targetdir]
 
Jun 2, 2008
380
6
Ah, I see that if you happen to be looking for an accurate subdirectory count, /h should also be used to keep the "." and ".." directories from being counted.
 

Similar threads