Change format of DIR total
Other than running the output through a clever filter, I don't know how
using the intrinsic DIR and PDIR, but I built this into my timedir. The
summary is always displayed the same as the file units themselves. If you
can't solve the problem with intrinsics, perhaps my program will help. You
can find it at jcook.net/timedir
D:\>timedir /h /k all.reg
2010-11-22 06:05 134,411,406 all.reg
134,411,406 bytes in 1 files and 0 directories.
620,108,730,368 bytes free.
D:\>timedir /h /k all.reg /s:g
2010-11-22 06:05 0g all.reg
0g bytes in 1 files and 0 directories.
620g bytes free.
D:\>timedir /h /k all.reg /s:m
2010-11-22 06:05 134m all.reg
134m bytes in 1 files and 0 directories.
620,109m bytes free.
D:\>timedir /h /k all.reg /s:k
2010-11-22 06:05 134,411k all.reg
134,411k bytes in 1 files and 0 directories.
620,108,726k bytes free.
The size factors may be any one of the common suffixes, any arbitrary
constant, and several abbreviated types. Email me at jim at jcook dot net if
you have questions.
On Mon, Nov 22, 2010 at 05:44, nikbackm <> wrote:
> Is there any way to change the format, and in particular the size units of
> the totals DIR displays for a directory(tree)?
> "1 106 729 bytes in 107 files and 3 dirs 1 310 720 bytes allocated"
> Would be good to be able to see the number of bytes in either Mb or Gb
> instead of single bytes.
> Tried PDIR, where you can change size unit, but seemingly only individual
> files, not for the totals.
2010 Sundays: 4/4, 6/6, 8/8, 10/10, 12/12 and 5/9, 9/5, 7/11, 11/7.
Next year they're Monday.