mIRC Home    About    Download    Register    News    Help

Print Thread
#149865 24/05/06 11:54 PM
Joined: May 2006
Posts: 1
E
Mostly harmless
OP Offline
Mostly harmless
E
Joined: May 2006
Posts: 1
Well, I'm about 90% done with my battlebot featuring X-Men vs. Capcom, lol.

And I'm having some trouble, after a month, I would like to delete a directory called /stats/ in my mIRC directory. How would I go about that?

$findfile(C:\Program Files\mvscbot\stats\,*,0,echo -a $1-)

I'm sure if I tweak the findfile code, I can make it work. The above code, as most of us already know, just echo's the files listed. I'm unsure if mIRC can do this, but if it can, can someone elaborate on this concept?

Thanks!

EK

#149866 25/05/06 12:23 AM
Joined: Aug 2005
Posts: 525
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Aug 2005
Posts: 525
/rmdir $+(",$mircdirstats,")



/rmdir is a command for removing a directory

$mircdir returns C:\Program Files\mIRC\

By adding stats to the end of $mircdir you get C:\Program Files\mIRC\stats

Since the directory contains spaces, " are needed.

$+() is used to concatenate everything together, resulting in "C:\Program Files\mIRC\stats"

#149867 25/05/06 02:09 AM
Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
/rmdir $+(",$mircdirstats,")
/rmdir is a command for removing a directory


can you remove a dir before its empty?
Code:
alias killdir {
var %null = $findfile($mircdirstats,*,0,remove $+(",$1-,"))
remdir $+(",$mircdirstats,")
}

in mIRC 6.17

alias killdir {
noop $findfile($mircdirstats,*,0,remove -b $qt($1-))
remdir $qt($mircdirstats)
}


note: UNTESTED

#149868 25/05/06 03:06 AM
Joined: Aug 2005
Posts: 525
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Aug 2005
Posts: 525
I stand corrected there.

Here's another solution using run.

alias killdir run cmd.exe /c rmdir $+(",$mircdirstats,") /S/Q


Link Copied to Clipboard