Page 1 of 1

How to delete all empty (sub)folders inside a dirtree?

Posted: 28 Aug 2017 04:43
by pstein
Assume I have the following topnode dir of a directory tree:

D:\tools\aaa\logs\

How can I delete all empty folders inside this topnode?

If the current directory contains an empty sub directory recursively then this should be deleted first....

How can I achieve this from dos batch script?

The top node should never been deleted.

Peter

Re: How to delete all empty (sub)folders inside a dirtree?

Posted: 28 Aug 2017 04:51
by aGerman