Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and the Yahoo Answers website is now in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

How to delete empty folders in Windows?

I'm looking for Windows command prompt equivalent of Linux command:

find -depth -type d -empty -exec rmdir {} \;

Update:

Eventually I've found out:

for /f "usebackq" %d in (`"dir /ad/b/s | sort /R"`) do rd "%d"

2 Answers

Relevance
  • 8 years ago
    Favorite Answer

    start a dosbox( cmd.exe)

    type in

    HELP

    these are the dos commands.

    for any command eg RMDIR type in the command followed by /? eg

    RMDIR/?

    usually a folder cannot bedeleted if it has SYSTEM attribute set or

    it contains HIDDEN items

  • Anonymous
    5 years ago

    make particular there are not any hidden archives and/or subfolders. To reveal hidden archives and folders flow to regulate Panel, Folder ideas, View Tab and decide "educate Hidden archives and Folders". click keep on with, then click ok and reboot.

Still have questions? Get your answers by asking now.