
Quick Question about deleting empty folders
Can someone help me with a code snippet? I need a script that will take a
directory as a starting place and search it and all subs. When it finds a
subfolder that is completely empty (no folders or files) it places the path
in an array (or dictionary), then later reads all paths in the array and
deletes them.
It would be possible that a folder has only an empty folder in it...so once
the child is deleted the parent would then be able to be deleted.
Thanks in advance!
-john