Change format of DIR totals

May 30, 2008
235
2
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.
 
May 20, 2008
603
0
Sammamish, WA
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.
>
>
>
>
>



--
Jim Cook
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.
 
May 30, 2008
235
2
No. (It's never been requested.)

But you could roll your own using things like @FILESIZE.

Ok, no big deal so don't consider this a request either. :)

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

Thanks! I already used timedir for generating time-sorted file lists over a whole sub-directory tree (which works great!).

This option seems to be missing from my copy, so I'll download the new version and try it out.
 
Similar threads
Thread starter Title Forum Replies Date
R History window wrong size, can't remember size change Support 12
H Behavior change re piping a string to a Java program Support 1
Alpengreis [FORUM] After change the font, bold is without effect Support 7
R How to? Change TCMD tab font size in window menu Support 3
E How to change window title tcmd window - not tcc window Support 1
Alpengreis Small things to change in installer and after installed Everything Support 0
Charles Dye File completion change Support 11
T Change language in script Support 4
Jay Sage Change in Behavior of Activate Command Support 4
I Change value of a variable while debugging Support 3
T Change language after installation Support 4
WadeHatler Fixed Breaking change in Expression evaluation (.and.) in v17 Support 6
D Fixed Change in behavior of variable expansion between 16 and 17 Support 3
Peter Bratton Change in scrput behaviour Support 4
A How to? Can't change directory ("cd") into system hidden files Support 13
J Change folder TCC starts in Support 2
vefatica A small change Support 7
ehab aboudaya How to? change ALT-F6 to another key Support 1
S How to? Change thread prefix? Easy "create thread" method? Support 8
S Terminology change Support 2
Peter Bratton @ping behavior change Support 2
T signaling firstcondition and cannot change colors Support 8
newbie Change percent-sign to anything-else in filename Support 24
Stefano Piccardi did the forum software change in the last two days? Support 2
nikbackm LocalHistory change Support 3
sully9 How to? Unexpected %DATE% CMD variable format (vs DATE /T format) in CMDebug Support 1
T Date format date different from cmd Support 7
vefatica @TIMER's format ... Support 2
T Elapsed time format in prompt changed in TCC 25 Support 10
Joe Caverly DATE format 4 Support 7
M Fixed Set "VAR=VAL" format causes problems Support 12
fpefpe touch - date format Support 2
T Problems with the new help format Support 18
samintz WAD @format has issues in v18.00.14 Support 10
mikea How to? Detecting clipboard format Support 7
fishman@panix.com Help file in Kindle format? Support 5
M PDir format question... Support 3
A Is TCC help available in PDF format? Support 2
S TIME /S report format Support 3
S Vince - forum format revisited Support 1
D No "Format" in right-click menu for DVD Support 11
C OT: Music file format checker Support 0
S Enhancement suggestion: @format and @formatn Support 0
E Fixed Bug with DIR /Z displaying descriptions Support 8
J Paths shown in DIR /B Support 2
K Fixed Prompt display will be shifted after use dir to display a filename with Chinese. (v25.00.28 x64) Support 18
Jesse Heines How to? How to display picture creation date with dir command Support 6
vefatica WAD DIR.BTM? Support 11
DrusTheAxe DIR reports meaningless SYMLINK information Support 14
C show file description? with dir? Support 8

Similar threads