1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Change format of DIR totals

Discussion in 'Support' started by nikbackm, Nov 22, 2010.

  1. nikbackm

    Joined:
    May 30, 2008
    Messages:
    205
    Likes Received:
    1
    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.
     
  2. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    10,092
    Likes Received:
    85
    No. (It's never been requested.)

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

    Joined:
    May 20, 2008
    Messages:
    604
    Likes Received:
    0
    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:




    --
    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.
     
  4. nikbackm

    Joined:
    May 30, 2008
    Messages:
    205
    Likes Received:
    1
    Ok, no big deal so don't consider this a request either. :)

    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.
     

Share This Page