/remove too weak. delete with $com, any better? - 12/09/07 09:19 AM
/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...
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 } }