mIRC Home    About    Download    Register    News    Help

Print Thread
#121097 23/05/05 08:07 PM
Joined: Dec 2002
Posts: 1,541
L
Hoopy frood
OP Offline
Hoopy frood
L
Joined: Dec 2002
Posts: 1,541
All I want to do is calculate how large my mp3 folders are. They're in two or three different folders and I can't seem to get the hang of $disk (if that's the right identifyer) to basically do a $calc(folder1size + folder2size + folder3size) in Gig format. Any assistance would be appreciated


Those who fail history are doomed to repeat it
#121098 23/05/05 08:10 PM
Joined: Feb 2005
Posts: 681
M
Fjord artisan
Offline
Fjord artisan
M
Joined: Feb 2005
Posts: 681
Folder sizes in bytes

$bytes($calc(folder1size + folder2size + folder3size),g).suf

Last edited by mIRCManiac; 23/05/05 08:11 PM.
#121099 24/05/05 12:09 AM
Joined: Dec 2002
Posts: 1,922
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
$disk() works only with drives (e.g., A:, C:). FiberOPtics' $foldersize can help you retrieve the size of individual folders.

#121100 24/05/05 12:56 AM
Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
I took a stab at it:
Code:
alias totmp3 {
  var %drive = $?="Drive letter like C: "
  window @Mp3 10 100 200 75
  aline @mp3 Start
  echo -s $finddir(%drive,*.*,0,totmp3-2 $1-)
}
alias totmp3-2 {
  .echo -q $findfile($1-,*.mp3,0,totmp3-add $file($1-).size )
}
alias totmp3-add {
  set %totmp3-raw $calc(%totmp3-raw + $1)
  totmp3-display
}
alias totmp3-display {
  window @Mp3 10 100 200 75
  rline @mp3 1 $bytes(%totmp3-raw,g).suf
}


might be a starting point anyway

#121101 24/05/05 02:16 AM
Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
I added multidrive ability and clearing of the %var
Code:
alias totmp3 {
  var %drive = $?="Drive letter like C: $crlf Enter multiple drive letters as C: D: L: "
  var %numtok = $gettok(%drive,0,32)
  window @Mp3 10 100 200 75
  aline @mp3 Start
  unset %totmp3-raw
  while (%numtok) {
    .echo -q $finddir($gettok(%drive,%numtok,32),*.*,0,totmp3-2 $1-)
    dec %numtok
  }
}
alias totmp3-2 {
  .echo -q $findfile($1-,*.mp3,0,totmp3-add $file($1-).size )
}
alias totmp3-add {
  set %totmp3-raw $calc(%totmp3-raw + $1)
  totmp3-display
}
alias totmp3-display {
  window @Mp3 10 100 200 75
  rline @mp3 1 $bytes(%totmp3-raw,g).suf
}


Link Copied to Clipboard