ccleve
5th January 2003 20:16 UTC
Recursive delete
How do I delete a directory and all subdirectories?
It appears that the Delete command does not have a /r switch like the File command.
I use the File /r on install, and I'd like to do a Delete /r on uninstall without naming all directories explicitly. The reason is that there are a very large number of subdirs, and they change from version to version and I'd rather not have to maintain the list.
Yathosho
5th January 2003 20:55 UTC
how about the RMDir command? tried that?
kichik
5th January 2003 20:58 UTC
RMDir has /r. Just be careful with that... Make sure you are not deleting something you wouldn't want to.
philoo
24th November 2003 11:58 UTC
indeed, you can use the RmDir /r command
but if you want to completely remove the directory, you should use:
RmDir /R
It tooks me a while to find this option.
kichik
24th November 2003 11:59 UTC
NSIS is case insensitive. RmDir /r and RmDir /R do the exact same thing.