I somewhat explained when I said it was about recursion, but the real reason is probably a memory issue.

Well our function must remove all files in the folder, look for all subfolders, and remove all files in that sub folder, then look for all subsubfolder in that subfolder, etc etc, so the main function is actually just a function removing all files in the directory, then calling itself for all the subfolder, and then removing that directory (you can't do it before looking for all subfolders), this is recursion:

/remfolder main_folder :
Code:
alias remfolder {
;get all directory in folder $1-
noop $finddir($1-,*,0,remfolder $1-)
rmdir $1-
}
It may be possible to write a procedural script (no recursion) but good luck with that.
And mIRC don't like recursion much, testing using something like this to create a lot of subfolders (/testf):
Code:
alias testf {
  var %a
  mkdir main_folder
  var %b 20
  while (%b) {
    %a = 8
     %d = main_folder
    while (%a) {
      %d = %d $+ \folder $+ %a $+ %b 
      mkdir $qt(%d)
      dec %a
    }
    dec %b
  }
}
executing /remfolder main_folder after that, I get an error (I'm on the latest 7.42, not 7.43 but it doesn't matter much) on /rmdir on a folder, if you try right away to delete that folder, with the exact same /rmdir command, it will work, suggesting no memory is available to do the operation, or something, I don't really know.


#mircscripting @ irc.swiftirc.net == the best mIRC help channel