mIRC Cleaner

By DarthReven on Apr 16, 2005

This is alittle dialog that will give you an organized way of deleting files in your mIRC folder

dialog mc {
  title "mIRC Cleaner"
  size 100 100 200 112
  option dbu
  tab "#1" 1,1 1 43 110
  tab "#2" 2
  box "File Types:" 3,2 17 40 90, tab 1
  check "*.mrc" 4,8 24 30 10, tab 1
  check "*.ini" 5,8 33 30 10, tab 1
  check "*.txt" 6,8 42 30 10, tab 1
  check "*.log" 7,8 51 30 10, tab 1
  check "*.doc" 8,8 59 30 10, tab 1
  check "*.dat" 9,8 69 30 10, tab 1
  check "*.hsh" 10,8 78 30 10, tab 1
  check "*.dll" 11,8 87 30 10, tab 1
  check "*.htm" 12,8 96 30 10, tab 1
  box "File Types:" 13,2 17 40 90, tab 2
  check "*.jpg" 14,8 24 30 10, tab 2
  check "*.gif" 15,8 33 30 10, tab 2
  check "*.png" 16,8 42 30 10, tab 2
  check "*.mp3" 17,8 51 30 10, tab 2
  check "*.wma" 18,8 59 30 10, tab 2
  check "*.bmp" 19,8 69 30 10, tab 2
  check "*.pdf" 20,8 78 30 10, tab 2
  check "*.rar" 21,8 87 30 10, tab 2
  check "*.zip" 22,8 96 30 10, tab 2
  list 23,46 10 150 90, multsel vsbar hsbar
  button "Analyze" 24,46 99 50 10
  button "Clean Selected" 25,126 99 70 10
}
on *:dialog:mc:*:*: {
  if ($devent == init) {
    did -b mc 25
  }
  elseif ($devent == sclick) {
    if ($did == 23) {
      if (!$read(del.txt,w,$did(23).seltext)) { write del.txt $did(23).seltext }
      else { var %tmp $read(del.txt,w,$did(23).seltext) | write -dl $+ $readn del.txt }
    }
    elseif ($did == 24) {
      if ($isfile(del.txt)) { .remove -b del.txt | goto scan }
      else { goto scan }
      :scan
      did -b mc 25
      did -r mc 23
      if ($did(4).state) { echo -q $findfile($mircdir,*.mrc,0,did -a mc 23 $1-) }
      if ($did(5).state) { echo -q $findfile($mircdir,*.ini,0,did -a mc 23 $1-) }
      if ($did(6).state) { echo -q $findfile($mircdir,*.txt,0,did -a mc 23 $1-) }
      if ($did(7).state) { echo -q $findfile($mircdir,*.log,0,did -a mc 23 $1-) }
      if ($did(8).state) { echo -q $findfile($mircdir,*.doc,0,did -a mc 23 $1-) }
      if ($did(9).state) { echo -q $findfile($mircdir,*.dat,0,did -a mc 23 $1-) }
      if ($did(10).state) { echo -q $findfile($mircdir,*.hsh,0,did -a mc 23 $1-) }
      if ($did(11).state) { echo -q $findfile($mircdir,*.dll,0,did -a mc 23 $1-) }
      if ($did(12).state) { echo -q $findfile($mircdir,*.htm,0,did -a mc 23 $1-) }
      if ($did(14).state) { echo -q $findfile($mircdir,*.jpg,0,did -a mc 23 $1-) }
      if ($did(15).state) { echo -q $findfile($mircdir,*.gif,0,did -a mc 23 $1-) }
      if ($did(16).state) { echo -q $findfile($mircdir,*.png,0,did -a mc 23 $1-) }
      if ($did(17).state) { echo -q $findfile($mircdir,*.mp3,0,did -a mc 23 $1-) }
      if ($did(18).state) { echo -q $findfile($mircdir,*.wma,0,did -a mc 23 $1-) }
      if ($did(19).state) { echo -q $findfile($mircdir,*.bmp,0,did -a mc 23 $1-) }
      if ($did(20).state) { echo -q $findfile($mircdir,*.pdf,0,did -a mc 23 $1-) }
      if ($did(21).state) { echo -q $findfile($mircdir,*.rar,0,did -a mc 23 $1-) }
      if ($did(20).state) { echo -q $findfile($mircdir,*.zip,0,did -a mc 23 $1-) }
      did -e mc 25
    }
    elseif ($did == 25) {
      did -b mc 25
      var %x 1
      while (%x <= $lines(del.txt)) {
        if ($script($read(del.txt,%x))) {
          did -d mc 23 $didwm(mc,23,$read(del.txt,%x))
          .unload -rs $nopath($read(del.txt,3))
          .remove -b $remove($read(del.txt,%x),$mircdir)
        }
        else {
          echo $remove($read(del.txt,%x),$mircdir)
          remove -b $remove($read(del.txt,%x),$mircdir)
          did -d mc 23 $didwm(mc,23,$read(del.txt,%x))
        }
        inc %x
      }
      .remove -b del.txt
    }
  }
  elseif ($devent == rclick) { if ($did == 23) { run $did(mc,23).seltext } }
  elseif ($devent == close) { if ($isfile(del.txt)) { .remove -b del.txt } }
}
menu * {
  -
  mIRC Cleaner { dialog -m mc mc }
  -
}

Comments

Sign in to comment.
xero   -  Jun 28, 2005

nice :)

 Respond  
DarthReven   -  Jun 12, 2005

Updated with 9 more file types

 Respond  
DarthReven   -  Apr 20, 2005

I\'ll be updating it with in the next weeks to handle even more file types with in the dialog

 Respond  
nobody   -  Apr 16, 2005

Good job, man.

 Respond  
DarthReven   -  Apr 16, 2005

thanx for the heads up xDaeMon its fixed now

 Respond  
supergeo   -  Apr 16, 2005
 Respond  
supergeo   -  Apr 16, 2005

nice. I\'ve always hated having to manually delete files, this makes it much easier!

 Respond  
xDaeMoN   -  Apr 16, 2005

One thing I noticed wrong is when you select .htm, it gives you .mrc files which is on \"if ($did(12).state)...\". Other than that, not bad.

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.