How do I find all the empty folders and delete them.

Anonymous
2011-04-03T17:52:58+00:00

My music has a bunch of folders that are empty but it will take forever to look at every single one.  I want to search by size or someway that will make it easier to find and delete

Windows for home | Previous Windows versions | Files, folders, and storage

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
Answer accepted by question author
Anonymous
2011-05-15T16:05:51+00:00

Hello !

If you do want to delete all the empty folders only ! go to Computer and at the top right click on search. Click on kind and Select folder, now click again on search and click on size, select 0 and click on search.

This should list all the empty folders

Regards

Was this answer helpful?

800+ people found this answer helpful.
0 comments No comments

55 additional answers

Sort by: Newest
  1. Anonymous
    2015-10-10T20:14:41+00:00

    Great.

    I hope this helps others too.

    Regards

    Roger

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2015-10-10T19:58:04+00:00

    Roger, 

    I discovered the root of my problem - I had "BD" instead of "RD" at the beginning of each line.  *facepalm*

    Thanks!

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2015-10-10T11:05:26+00:00

    The one line command

    *** DIR /AD/B/S | SORT /R > DIR-empty.BAT  ***

    creates the DIR-empty.bat  file.

    The DIR-empty.bat file contains the names of all folders/directories on your hard drive.

    The RD (remove directory) command will not delete non empty foldders/directories.

    All machines under Microsoft bridle have an ASCII editor ; it is Notepad.

    You can get to Notepad as easily as you get to CMD.

    Do not hesitate If you have other questions.

    Regards,

    Roger

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2015-10-10T10:40:25+00:00

    Hi,

    Your

      C:%directoryofinterest%>RD"C:%directoryofinterest\AppData\Local"

         The filename, directory name, or volume label syntax is incorrect.

    message shows the result of the command.

    Can you list two lines from the Batch file you have created ?

    We will work from that.

    Regards

    RG

    Was this answer helpful?

    0 comments No comments