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

Discus and support How do I use the command prompt to delete files with similar names? in Windows 10 Support to solve the problem; How do I use the command prompt to delete files with similar names? 78835 Discussion in 'Windows 10 Support' started by Hotsuma, Mar 6, 2017.

  1. Hotsuma Win User

    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?

    :)
     
    Hotsuma, Mar 6, 2017
    #1

  2. How do i use the command prompt to access wireless in safe mode? - Thread moved to a more appropriate forum category.

    Hello Susan,

    To exit Safe Mode, follow the steps below:

    • Press Windows + R key.
    • On the text box, type msconfig and click OK.
    • Select Boot tab
    • Remove the check mark on Safe Boot.
    • Click OK and reboot your PC. Your PC should now boot in normal boot.
    You can also access Safe Mode with Networking using the Command Prompt. Just type
    bcdedit /copy {Current} /d "Windows 10 Safe Mode with Networking" then hit
    Enter.

    For more information about Safe Mode in Windows 10, click
    here
    .

    Let us know how it goes.

    Thank you.

    *** Post moved by the moderator to the appropriate forum category. ***

    I moved your post to a more appropriate forum category. This is to help other community members understand your concern better.


    It is now under Power on or off a device.
     
    Kenneth Mon, Mar 6, 2017
    #2
  3. How do i use the command prompt to access wireless in safe mode? - Thread moved to a more appropriate forum category.

    Windows 10 is in safe mode. will not accept the password to sign in. Is there a way to use the command prompt to get back to regular mode or safe with internet?
     
    SusanEmmons, Mar 6, 2017
    #3
  4. RolandJS Win User

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

    Are you meaning, for example:
    c:\[directory\subdirectory>DEL 12345*.*
    c:\...............ditto................ >DEL *.txt
    Things like that?
     
    RolandJS, Mar 6, 2017
    #4
  5. Bree New Member
    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!
     
    Bree, Mar 6, 2017
    #5
  6. Hotsuma Win User
    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.
     
    Hotsuma, Mar 6, 2017
    #6
  7. Bree New Member
    Perhaps you could give an example of the similar names (and say which you want to keep or delete).
     
    Bree, Mar 6, 2017
    #7
  8. Hotsuma Win User

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

    They're game ROMs. Is it okay for me to post a few names?
     
    Hotsuma, Mar 6, 2017
    #8
  9. Bree New Member
    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.
     
    Bree, Mar 6, 2017
    #9
  10. Hotsuma Win User
    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
     
    Hotsuma, Mar 6, 2017
    #10
  11. Hotsuma Win User
    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.
     
    Hotsuma, Mar 6, 2017
    #11
  12. Hotsuma Win User
    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.
     
    Hotsuma, Mar 6, 2017
    #12
  13. RolandJS Win User

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

    That might be trickier than it looks; let a few others weigh in before doing mass deletes.
     
    RolandJS, Mar 6, 2017
    #13
  14. Bree New Member
    You need to use one or more wildcards that would match the ones you want to delete, but not match the one you want to keep like this (make sure there'a space between the two wildcards): del *[b*.gb *[t*.gb

    Just to be sure, you could first give all your [!] files the read-only attribute with attrib *[!].* +R
    You can make them read-write again later with attrib *[!].* -R

    Code: Directory of C:\TEMP\TEST 07/03/2017 20:34 <DIR> . 07/03/2017 20:34 <DIR> .. 07/03/2017 20:34 7 Amazing Spider-Man, The (UE) [b2].gb 07/03/2017 20:34 7 Amazing Spider-Man, The (UE) [b3].gb 07/03/2017 20:34 7 Amazing Spider-Man, The (UE) [!].gb 07/03/2017 20:34 7 Amazing Spider-Man, The (UE) [b1].gb 07/03/2017 20:34 7 Amazing Spider-Man, The (UE) [b4].gb 07/03/2017 20:34 7 Amazing Spider-Man, The (UE) [b5].gb 07/03/2017 20:34 7 Amazing Spider-Man, The (UE) [T+Fre_Emulation-151].gb 07/03/2017 20:34 7 Amazing Spider-Man, The (UE) [T+Ger0.99_Star-trans].gb 07/03/2017 20:34 452 TEST.bat 9 File(s) 508 bytes 2 Dir(s) 181,137,719,296 bytes free C:\TEMP\TEST>del *[b*.gb *[t*.gb C:\TEMP\TEST>dir Volume in drive C is WINDOWS Volume Serial Number is 3440-777B Directory of C:\TEMP\TEST 07/03/2017 20:36 <DIR> . 07/03/2017 20:36 <DIR> .. 07/03/2017 20:34 7 Amazing Spider-Man, The (UE) [!].gb 07/03/2017 20:34 452 TEST.bat 2 File(s) 459 bytes 2 Dir(s) 181,137,735,680 bytes free[/quote]
     
Thema:

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

Loading...
  1. How do I use the command prompt to delete files with similar names? - Similar Threads - command prompt delete

  2. copy file with new name in command prompt

    in Windows 10 Gaming
    copy file with new name in command prompt: To copy a file with a new name in the command prompt, you can use the copy a command followed by the source file path and the destination file path. Here's the syntax:cssCopy codecopy [source_file_path] [destination_file_path]Replace [source_file_path] with the path of the...
  3. copy file with new name in command prompt

    in Windows 10 Software and Apps
    copy file with new name in command prompt: To copy a file with a new name in the command prompt, you can use the copy a command followed by the source file path and the destination file path. Here's the syntax:cssCopy codecopy [source_file_path] [destination_file_path]Replace [source_file_path] with the path of the...
  4. copy file with new name in command prompt

    in Windows 10 Software and Apps
    copy file with new name in command prompt: Hi all, This is a bit of an unusual question. I use a radio automation program called Zara, and am trying to get it to load certain sweeper files automatically. The files where these are stored have a ZSL extension. I have them stored currently in my music folder in a Zara...
  5. copy file with new name in command prompt

    in Windows 10 Network and Sharing
    copy file with new name in command prompt: Hi all, This is a bit of an unusual question. I use a radio automation program called Zara, and am trying to get it to load certain sweeper files automatically. The files where these are stored have a ZSL extension. I have them stored currently in my music folder in a Zara...
  6. Command Prompt Renaming Files with " and ' in the file name.

    in Windows 10 Network and Sharing
    Command Prompt Renaming Files with " and ' in the file name.: I have a folder with thousands of files with in it. I have been trying to run various batch commands on the files within this folder, however some of these files have " and ' within their filename. Is there some way to either eliminate the problem characters from within the...
  7. How do I remove files with similar names from a folder?

    in Windows 10 Support
    How do I remove files with similar names from a folder?: Hi, I have a folder with 1000+ files containing images. They have similar names like: imgred_4752 imgred_4785 imgred_4473 imgyellow_571 imgyellow_582 imgyellow_565 I would need one file per type, so, for example, it should be: imgred_4752 imgyellow_582 Can I do it with a...
  8. Copy files with similar names to folders with similar names

    in Windows 10 Network and Sharing
    Copy files with similar names to folders with similar names: Hello, I am using windows and have the following situation: I have multiple PDF files which naming system is as following: 0. AAL00-SPI-FOR-535-1801 0. AAL00-SPI-FOR-535-1802 0. AAL00-SPI-FOR-535-1807 I also have folders that are named as following:...
  9. How to delete files and folders using Command Prompt in Windows 10

    in Windows 10 News
    How to delete files and folders using Command Prompt in Windows 10: [ATTACH] [ATTACH]At times, all our attempts to delete files or folders via File Explorer yield no results. Many reasons can be attributed to the failure, which can lock down the files/folders and prevent their deletion. In such cases, you can use [...] This post How to...
  10. Need help using Command Prompt to delete files & folders.

    in Windows 10 Network and Sharing
    Need help using Command Prompt to delete files & folders.: This is the name of the folder I am trying to delete: I:\WD Backup.swstor DONT USE\Gary Smetana\N2M3NzM4ZTM3ZGZlNDE1OD\Volume{83749cc6-0000-0000-0000-501f00000000}\Users\Gary Smetana\Desktop\Favorites\Higgs Boson and GeV as mass I put that address into the following...