mIRC Homepage
/remove command is quite weak, then i want to ask any better to use $com to perform a deletion? then how to implement the codes? thanks...
I imagine it can be done with $com statements, but why do you think /remove is "weak"?
it cant remove certain of attributed files like read-only. i want to try $com, just maybe $com can perform like windows do...
Until someone finds or comes up with a COM Objects solution, using the -b switch in the /remove call will remove read only files. But as stated in the help file:

The -b switch deletes the file and moves it to the recycle bin.
Code:
alias _remove { 
  var %obj = fso $+ $ctime, %file = $iif($nopath($1-) == $1-,$mircdir $+ $1-,$1-)
  .comopen %obj scripting.filesystemobject
  if (!$comerr) {
    if (!$com(%obj,DeleteFile,3,bstr,%file,bool,true)) { echo -ac info * /_remove: $iif(!$isfile(%file),the file does not exist.,the file is in use.) }
    else { echo -acq info * /_remove: removed $qt(%file) }
    .comclose %obj
  }
}


Same usage as /remove
thanks... the $com delete command much powerful than /remove
© mIRC Discussion Forums