mIRC Home    About    Download    Register    News    Help

Print Thread
#260096 28/02/17 06:37 PM
Joined: Jul 2014
Posts: 313
TECO Offline OP
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
Joined: Jul 2014
Posts: 313
I need your help.
I have a code that automatically creates the logs that are listed below, but I would like to be able to create an alias that could delete them all at the same time.

@RF[Pplware].log
@RF[Publico].log
@RF[Wintech].log
@RF[Sapo_Tek].log

For example:

Code:
alias _logdir {
  var %p = $shortfn($mircdirlogs\)
  if ($1) { return %p $+ $1- }
  return %p
}

alias clean { .remove $_logdir(@RF[*].log) }


But this does not work.
Is it possible for someone to help me?

Last edited by Tiago; 28/02/17 06:46 PM.

TECO
irc.PTirc.org (Co-Admin)
TECO #260100 01/03/17 04:24 AM
Joined: Aug 2016
Posts: 57
R
Babel fish
Offline
Babel fish
R
Joined: Aug 2016
Posts: 57
This deletes all the "@RF [*] .log" files in the specified DIR.

Code:
while ($findfile(DIR,@RF[*].log,1)) .remove $v1


It also looks like you want to delete the directory ... I do not know, it's kind of confusing.
However, to delete a directory use:
Code:
rmdir <DIR>


rockcavera
#Scripts @ irc.VirtuaLife.com.br
Joined: Jul 2014
Posts: 313
TECO Offline OP
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
Joined: Jul 2014
Posts: 313
Originally Posted By: rockcavera
This deletes all the "@RF [*] .log" files in the specified DIR.
Code:
while ($findfile(DIR,@RF[*].log,1)) .remove $v1



Thank you for your help.
That's what I wanted. Good week smile


TECO
irc.PTirc.org (Co-Admin)

Link Copied to Clipboard