Windows 10: How do I use the command prompt to delete files with similar names?

Page 1 of 2 12 LastLast

  1. Posts : 6
    Windows 10 Home x64
       07 Mar 2017 #1

    How do I use the command prompt to delete files with similar names?


    How do I use the command prompt to delete files with similar names?
      My ComputerSystem Spec

  2.    07 Mar 2017 #2

    Are you meaning, for example:
    c:\[directory\subdirectory>DEL 12345*.*
    c:\...............ditto................ >DEL *.txt
    Things like that?
      My ComputerSystem Spec


  3. Posts : 4,512
    10 Home x64 (1709) (10 Pro on 2nd pc)
       07 Mar 2017 #3

    Welcome to Tenforums @Hotsuma

    You use wildcards.

    The * character matches any character (in any number, including none), the ? character matches exactly one character. For example: A???B*.* will match all files starting with A (or a, it's not case-sensitive) followed by any three characters, then B then any number of characters and any extension.

    You can use the same wildcard with the DIR command first to see if you have narrowed it down to just the files you want. If you can't narrow it down enough, use DEL /P which will prompt for confirmation before deleting. Note that from a command prompt you are doing a permanent delete, it doesn't use the Recycle Bin, so be careful!
      My ComputersSystem Spec


  4. Posts : 6
    Windows 10 Home x64
    Thread Starter
       07 Mar 2017 #4

    Yes. But it seems to be more trouble than it's worth. I have over 9,000 files and each file has about 6 other similarly named files. I just want to get rid of those similar files.
      My ComputerSystem Spec


  5. Posts : 4,512
    10 Home x64 (1709) (10 Pro on 2nd pc)
       07 Mar 2017 #5

    Hotsuma said: View Post
    I have over 9,000 files and each file has about 6 other similarly named files. I just want to get rid of those similar files.
    Perhaps you could give an example of the similar names (and say which you want to keep or delete).
      My ComputersSystem Spec


  6. Posts : 6
    Windows 10 Home x64
    Thread Starter
       07 Mar 2017 #6

    They're game ROMs. Is it okay for me to post a few names?
      My ComputerSystem Spec


  7. Posts : 4,512
    10 Home x64 (1709) (10 Pro on 2nd pc)
       07 Mar 2017 #7

    Change the names to disguise them if you wish, but make sure they still demonstrate the similarities that are making it difficult for you to distinguish between them.
      My ComputersSystem Spec


  8. Posts : 6
    Windows 10 Home x64
    Thread Starter
       07 Mar 2017 #8

    Ok. I now see what I need to do in order to delete all of the files that I don't need. I want to keep all files that has the "[!]" at the ends. These are the original files. The rest are hacks or Japanese versions.

    Amazing Spider-Man, The (UE) [!].gb
    Amazing Spider-Man, The (UE) [b1].gb
    Amazing Spider-Man, The (UE) [b2].gb
    Amazing Spider-Man, The (UE) [b3].gb
    Amazing Spider-Man, The (UE) [b4].gb
    Amazing Spider-Man, The (UE) [b5].gb
    Amazing Spider-Man, The (UE) [T+Fre_Emulation-151].gb
    Amazing Spider-Man, The (UE) [T+Ger0.99_Star-trans].gb
      My ComputerSystem Spec


  9. Posts : 6
    Windows 10 Home x64
    Thread Starter
       07 Mar 2017 #9

    RolandJS said: View Post
    Are you meaning, for example:
    c:\[directory\subdirectory>DEL 12345*.*
    c:\...............ditto................ >DEL *.txt
    Things like that?
    Yup. So, if I wanted to delete all files except for the ones that have the "[!]" at the end, how would I go about doing that? Actually, let me try and see if it works.
      My ComputerSystem Spec


  10. Posts : 6
    Windows 10 Home x64
    Thread Starter
       07 Mar 2017 #10

    How do I delete all files except for those who has the [!] in their file names?

    EDIT:

    Found a workaround. It's a free program called Bulk File Manager v1.6. I appreciate the help.
    Last edited by Hotsuma; 07 Mar 2017 at 16:16.
      My ComputerSystem Spec


 
Page 1 of 2 12 LastLast

Related Threads
Command Prompt in General Support
Every time I use my laptop there is this COMMAND BOX that appears and within a second it disappears. Its really irritating and the worst part is if I am playing games or using any other program at that time the program that I am using minimizes...
Command prompt pop up in General Support
Hi, for a while now i been having an issue with command prompt. The command prompt will randomly pop up and close immediately. i have had this issue for a while but it didn't really effect me. Recently ive been playing a lot of games and the...
Can you delete wake timers from the command prompt? I am thinking specifically of wake timers created by Update Orchestrator, which cannot be permanently disabled no matter how many settings you alter (and believe me, I have spent hours and days...
Solved Command Prompt in General Support
How to call up "command Prompt (Admin) from the "run" dialog box win 10 Home?
Command Prompt? in General Support
Guys, I'm going to try one last time. The error code I received told to me to empty files and then "Run the command prompt as an administrator"?? Then, type wuauclt.exe/update now??......I don't know what run the command prompt means. I have no...
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 00:17.
Find Us