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: Most helpful
  1. Anonymous
    2017-11-21T15:00:59+00:00

    Since Windows currently will not do it, you can install a program from the internet and run it.

    Remove Empty Directories

    https://sourceforge.net/projects/rem-empty-dir/

    Worked great as of 20171112

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2017-11-21T06:49:20+00:00

    I am cleaning up my computer - running WIN 10 - I have lots of empty folders which I can identify and remove manually but it is going to take me a long time.  I came across this help item but cannot work out how it fits in File Explorer or "Computer" ( my only guess is "my PC") so have been unable to make it work - can anyone translate or convert into WIN 10 technical terms.

    Regards

    Roland

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2017-11-12T19:46:17+00:00

    Jhatcher55: Thanks for taking the time to be helpful!

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2017-11-12T18:27:11+00:00

    We have a 6 year old post with replies till recently including answers that were helpful. Since Windows 10 File Explorer no longer works for empty directories, here I am working around Microsoft bugs, documenting their bugs, and posting a work around. Here are my notes.

    Microsoft once again has broken software in Window 10 for doing a common needed function, REMOVING EMPTY FOLDERS. There are all kind of ways to end up with lots of empty sub folders in a folder. Separating pictures and videos in a massive picture folder was my case. The following are the two Microsoft ways that should work, followed by a free and good program that actually works. I include the broken ways assuming they will be fixed some day. Also to help others and share what wasted so much of my time.

    Using the File Explorer is what absolutely should work. Go to the folder, go to the search box, pick “kind” in the search choices and pick “folder”, then pick “size” in the search choices and pick “empty”. Unfortunately once you pick “empty” you get nothing. Before it was broken you would get all the actual empty ones and you could delete them.

    Using a command line is an old style and rather technical way that should work too. You basically use a command line script to find all directories and do a rd (rmdir) on each which will only remove empty ones. The broken part is that it says the empty folders show up as not empty. I certainly won’t bother with explaining the options or why you need to reverse sort the order. Here is the script to be run from the prompt at the directory (folder).

    for /f "delims=" %d in ('dir /s /b /ad | sort /r') do rd "%d"

    If you put it in a batch file you will need these processing characters.

    for /f "delims=" %%d in ('dir /s /b /ad ^| sort /r') do rd "%%d"

    NOW for what you can do till Microsoft fixes its bugs. Go to the link below and install the program. If the link gets removed or disappears in the future, search for “remove empty directories”. It downloads a file named “red-v2.2-setup.exe”. I’d save it away since it is now free and works.

    Remove Empty Directories

    https://sourceforge.net/projects/rem-empty-dir/

    Worked great as of 20171112

    Was this answer helpful?

    0 comments No comments