I'm using the following code that I found on this site to remove ONLY empty directories. Does anyone have a better routine than this one? Sometimes the procedure is finished within a second, sometimes it takes 15+ seconds, sometimes it never finishes (gets in an infinite loop).

Thanks in advance,
Dave