Windows 10: Delete all folders without files with a certain extension in them

Discus and support Delete all folders without files with a certain extension in them in Windows 10 Ask Insider to solve the problem; Let's say I have a folder with around 200 subfolders in it. In some of those subfolders there are .pdf and .mp3 files, and in some of them .txt, .pdf... Discussion in 'Windows 10 Ask Insider' started by /u/uyopi, Oct 1, 2020.

  1. /u/uyopi Win User

    Delete all folders without files with a certain extension in them


    Let's say I have a folder with around 200 subfolders in it. In some of those subfolders there are .pdf and .mp3 files, and in some of them .txt, .pdf and .mp3 files. Now let's say I want to delete all subfolders that DON'T CONTAIN .txt files. Is there a quick and clean way to do it?

    submitted by /u/uyopi
    [link] [comments]

    :)
     
    /u/uyopi, Oct 1, 2020
    #1

  2. Trouble deleting a folder

    Thanks for the suggestion but it says "delete folder failed for E:\....." for each folder I try.

    *Confused Delete all folders without files with a certain extension in them :confused:

    Will I be forever stuck with these unnecessary folders? *Oh Well Delete all folders without files with a certain extension in them :eek:hwell:
     
    oli_ramsay, Oct 1, 2020
    #2
  3. topgundcp Win User
    Unable to delete a folder - Invalid folder name


    Suggestion:
    1. Run chkdsk x: /r to make sure that there's no HD corruption.
      x: is the drive containing the folder you want to delete.
    2. Try to delete the folder again. If still does not work, go to step 3.
    3. Download: Download - Linux Mint and create a bootable USB using: Rufus - Create bootable USB
    4. Boot up with Linux Mint and try to delete the folder again.
      NOTE: Unlike WinPE. Linux does not have any Windows permission imposed to it so it is easier to delete.
     
    topgundcp, Oct 1, 2020
    #3
  4. Delete all folders without files with a certain extension in them

    Delete a file folder.

    In such cases it is often possible to use this 3-step process:

    1. Move the folder to C:\
    2. Reboot
    3. Delete the folder
     
    Frederik Long, Oct 1, 2020
    #4
Thema:

Delete all folders without files with a certain extension in them

Loading...
  1. Delete all folders without files with a certain extension in them - Similar Threads - Delete folders without

  2. File without extension that can't get deleted (tried all recommended solutions)

    in Windows 10 Ask Insider
    File without extension that can't get deleted (tried all recommended solutions): The file appeared after I had a program crash in the middle of saving a file(.sai2), I have a "twin" file that actually works as expected The file is 0 bytes, has no extension, is virus-free, can't be moved, can't be renamed, no program can open it, Windows tells me that the...
  3. Delete only folders and not the files in them

    in Windows 10 Ask Insider
    Delete only folders and not the files in them: Hi, I have a folder on my drive with many folders inside of it. I want to “empty” all of the sub folders into the main folder and delete the sub folders while keeping all files intact. Folder->subfolder->files Into Folder->files Is there a way to do this on a large scale...
  4. I Need A Way To Hide All Files Of A Certain Extension

    in Windows 10 Ask Insider
    I Need A Way To Hide All Files Of A Certain Extension: As the title says, i'm looking for a way in Windows 10 (or with a piece of 3rd party software) that will allow me to select a specific file extension and have the system hide all files with that extension so they don't show up in folders, file explorer, etc. submitted by...
  5. ALL FILES AND FOLDERS DELETED

    in Windows 10 Network and Sharing
    ALL FILES AND FOLDERS DELETED: All my files and folders have been deleted on my PC and whenever I save a document, it gets deleted when I switch off the PC. Please help. https://answers.microsoft.com/en-us/windows/forum/all/all-files-and-folders-deleted/c18ae88f-af6d-4b28-a521-0f1168f0f6de"
  6. Firefox has deleted all extensions and won't reload them

    in Browsers and Email
    Firefox has deleted all extensions and won't reload them: Something has happened to Firefox where it's deleted all of my extensions Ad Block Plus, UBlock Origin, etc. and if I try and go reinstall them I get an error message saying "download failed, check your connection". I've never seen this happen before. I've restarted the...
  7. Changing file extension of all files in the folder

    in Windows 10 Network and Sharing
    Changing file extension of all files in the folder: I don't know how to change extensions of all files in my folder. All files don't have any extension and I dont know how to do it with powershell. How do I change it so all of them have extensions?...
  8. All of my files got deleted by an update ... all of them

    in Windows 10 Installation and Upgrade
    All of my files got deleted by an update ... all of them: I was just playing a game and suddenly Windows start an update...automatically...without my permission...After it was done I was greeted with a black desktop with nothing but recycle bin on it. Not only that but when I said all my files got deleted... I meant all... Even...
  9. Folders Disappeared without Me Deleting Them -- WTF !!?!!

    in Windows 10 Support
    Folders Disappeared without Me Deleting Them -- WTF !!?!!: A few very important folders have disppreared from my computer without me EVER deleting them. They were on my desktop forever until I noticed recently they're not there anymore. Why the f*** is this happening?? How can I get them back?? 101865
  10. File without extension

    in Windows 10 Support
    File without extension: Hi everyone,I have download a file recently, called "download" which has no extension,so I wonder what it is. ***It's from onlinevideoconverter.com,I downloaded a song. 46974