fabiochelly
26th February 2004 16:54 UTC
Remove folders recursively only if they're empty
Hi,
Is it possible to a folder which can contains other folders (etc.) but ni files in it.
In fact my problem is that "RMDir /r" removes recursively but even if there are files in it.
"RMDir" removes only if the folder is compeletely empty (even if it has empty folders).
What I would like is to remove recursively my folders if they doesn't contain any files
Joost Verburg
26th February 2004 16:56 UTC
First use RMDir for the folders inside the folder and then remove the folder itself.
fabiochelly
26th February 2004 17:00 UTC
But how can I do that if I don't know the exact tree?
Joost Verburg
26th February 2004 17:08 UTC
Then you will have to check wheather there are files inside. The search functions in the NSIS Archive might help you.
fabiochelly
26th February 2004 17:21 UTC
Thank you.
I will try to create a recurse file search