Loading ...
Sorry, an error occurred while loading the content.
 

[Clip] Re: Total File Size

Expand Messages
  • Jody
    Hi Wayne and Claes, ... Uh, well of course. Should have figured that one out. No wonder my wife says, ARGH, when she asks me to pick up 2 onions and 2
    Message 1 of 5 , Feb 29, 2000
      Hi Wayne and Claes,

      >> ^!Set %TotalSize%=^$Calc((^%FileSize%+^%TotalSize%)/1024)$
      >> Might this not rather be:
      >> ^!Set %TotalSize%=^$Calc((^%FileSize%/1024)+^%TotalSize%)$

      Uh, well of course. Should have figured that one out. No wonder my
      wife says, "ARGH," when she asks me to pick up 2 onions and 2 green
      peppers on my way home and I come back with 4 floppy disks in hand. <bg>

      Directory: C:\WINDOWS\SYSTEM\
      File count: 604
      File type: .dll
      Total size: 90.77Mb

      Now that I can believe. :) Thanks Wayne and Claes.

      Here's the freeware version. I'll put the nickle version on
      Snatch-A-Clip and in my DirStuff later.

      <--- Copy below this line --->
      H=File Count & Sizes
      ; Last Updated 02/29/2000, Sojourner@..., jody
      ^!ClearVariables
      ^!SetHintInfo Calculating...
      ^!SetArray %FileList%=^$GetFiles(^?[(T=D)Directory];"^?[File type(s) *.txt;*.htm*;*.dll;*.exe (all types shown)=*.*]")$
      ^!Set %Count%=^%FileList0%
      ^!Set %Index%=0; %FileCount%=0

      :Loop
      ^!Inc %Index%
      ^!If ^%Index% > ^%Count% Stats
      ^!Set %FileSize%=^$GetFileSize("^%FileList^%Index%%")$
      ^!IfTrue ^%FirstPass% Skip_3
      ^!Set %TotalSize%=^$Calc((^%FileSize%+0)/1024)$
      ^!Set %FirstPass%=1
      ^!Goto Skip
      ^!Set %TotalSize%=^$Calc((^%FileSize%/1024)+^%TotalSize%)$
      ^!Inc %FileCount%
      ^!Goto Loop

      :Stats
      ^!If ^$Calc(^%TotalSize%+0;0)$ > ^$Calc(999+0;0)$ Skip_2
      ^!Info [L]Total count: ^%FileCount%^pTotal size: ^%TotalSize%kb
      ^!Goto End
      ^!Info [L]Total count: ^%FileCount%^pTotal size: ^$Calc(^%TotalSize%/1024)$Mb

      <--- Copy above this line, right --->
      <--- click over a Library, and --->
      <--- choose "Add from Clipboard" --->

      Happy Clip'n!
      Jody

      http://www.sureword.com/notetab

      Subscribe, UnSubscribe, Options
      mailto:Ntb-Clips-Subscribe@...
      mailto:Ntb-Clips-UnSubscribe@...
      http://www.egroups.com/list/ntb-clips
    Your message has been successfully submitted and would be delivered to recipients shortly.