Link to home
Start Free TrialLog in
Avatar of webkiwi1
webkiwi1

asked on

Check for and delete empty folders

Hello Experts,

I am looking for a solution to check for empty sub-folders in a given directory, and then delete those empty folders when found.

Would also be nice if the folder is not empty, to copy contents to a location, and thend elete the now empty folder.

Thanks,
Michael
ASKER CERTIFIED SOLUTION
Avatar of Bob Learned
Bob Learned
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of webkiwi1
webkiwi1

ASKER

Awesome, thank you. I will take a look at both and get back to you.
OK, both solutions worked..sorry it took so long to try them out!

VBRocks, I did forget that there would be some directories in the main folder with files in it that I DID NOT want moved...hehehe. You routine worked so well it moved everything!

Splitting points.