If I have a subfolder in mirc-root that contains random files with random names and I want to clear them all with write -c, whats the best method todo this?
Heh... I just realized that /clearall is already an alias within mIRC, for clearing all windows' text.
Change that to /clearfiles or something... lol
*~* shrugs *~*
noop $findfile(foldername, *, 0, write -c $1).shortfn
That'll clear all files in foldername and in any subfolders of it aswell. If you just want to clear the files in that specific folder use:
noop $findfile(foldername, *, 0, 0, write -c $1).shortfn
Note: $findfile() as used above will also return the number of files cleared if you need it.
ahh yes, a demonstration of noop... cool.
Thanks starbucks_mafia, I saw the $1 command regarding findfile but wasnt sure how to set it up. /noop makes that nice.
Your code demonstrates one of the "don'ts" in mIRC coding. Using $findfile within a loop like that is incredibly inefficient. $findfile has its own looping mechanism (as demonstrated above) which is the most efficient method you can use.