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: Oldest
  1. Anonymous
    2015-10-08T22:06:36+00:00

    I see 

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

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

    repeated a bunch of times for each folder in the batch.  

    I think I may be misunderstanding your

          Put every line between << " >>

    I thought you meant put every line in quotation marks, and then put "RD" in front of it.  Not so?   

    By the way, I don't have an ASCII editor that I am aware of, and I don't have admin privileges to install on my work computer, so I used MS Word find and replace to replace every ^p with "^p", and then put the " in front of the first line and deleted the extraneous last ", then did similar for RD, with "Use wildcards" unchecked, and then I just opened the .bat file in notepad and pasted the modified text from Word into it.  Do I need to generate it with an ASCII editor for the syntax to be correct?

    Also, as I believe somebody mentioned above, the DIR-empty.bat file produced by the intial command contains *every* directory, not just empty ones. Is the RD "~" step supposed to apply a filter to get to the actual empty ones?

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments
  2. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  3. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  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