mIRC Homepage
Posted By: landonsandor Stupid question - 23/05/05 08:07 PM
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
Posted By: mIRCManiac Re: Stupid question - 23/05/05 08:10 PM
Folder sizes in bytes

$bytes($calc(folder1size + folder2size + folder3size),g).suf
Posted By: Online Re: Stupid question - 24/05/05 12:09 AM
$disk() works only with drives (e.g., A:, C:). FiberOPtics' $foldersize can help you retrieve the size of individual folders.
Posted By: MikeChat Re: Stupid question - 24/05/05 12:56 AM
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
Posted By: MikeChat Re: Stupid question - 24/05/05 02:16 AM
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
}
© mIRC Discussion Forums