Windows 10: Delete similar files by batch file?

Discus and support Delete similar files by batch file? in Windows 10 Graphic Cards to solve the problem; Hello everybody! I'm writing a batch file that I want to use to delete different folders, whose folder name starts with the same name (e.g. Test) but... Discussion in 'Windows 10 Graphic Cards' started by 3000Alex, Jul 11, 2020.

  1. 3000Alex Win User

    Delete similar files by batch file?


    Hello everybody!

    I'm writing a batch file that I want to use to delete different folders, whose folder name starts with the same name (e.g. Test) but ends differently (i.e. test number, test digit, etc.). Is there any solution for this? Or do I have to list every single folder?

    Many thanks in advance!

    LG Alex

    :)
     
    3000Alex, Jul 11, 2020
    #1

  2. Batch file

    thank you for your reply. how to merge the codes so that the batch file does this

    the batch file displays the options below

    1. open the *.spl file in notepad
    2. delete the *.shd and *.spl files
    3.exit

    commands execute as options are selected
     
    Sandeep Bhugoo, Jul 11, 2020
    #2
  3. oily_17 Win User
    Batch Files Knowledge Base

    Don't use batch files very much but one I find useful is for creating a list of files in a directory.
    Just copy the text below into Notepad and save as Filelist.bat

    dir /a /-p /o:gen >filelist.txt

    When you run it from a folder it will create a Filelist.txt file,in the same folder, that lists all the files in that folder.Useful when you are too lazy to type all the files out yourself.
     
    oily_17, Jul 11, 2020
    #3
  4. Delete similar files by batch file?

    Batch Files Knowledge Base

    Very nice and usefull thanks for contributing.
     
    AphexDreamer, Jul 11, 2020
    #4
Thema:

Delete similar files by batch file?

Loading...
  1. Delete similar files by batch file? - Similar Threads - Delete similar files

  2. Create batch files with Batch?

    in Windows 10 Software and Apps
    Create batch files with Batch?: How to create Batch and VBS files with Batch? So I write a batch file which I then convert to exe that creates new folders in a certain directory and then creates batch and VBS files with a certain content and saves them in the created folder. So it's similar to a program...
  3. Batch Files

    in Windows 10 Network and Sharing
    Batch Files: I want to make a batch file that will copy a specific folder from my USB stick to a folder on C:\ I want to know if it's possible to make a batch file that will take the folder from my USB drive no matter what the drive's letter is....
  4. Batch File

    in Windows 10 Support
    Batch File: I need a batch file to create a folder with sub folders. The sub folders will be named the current date, they will go in a folder on c drive. For example we can call the folder test and it would be in documents on c drive. Every time we run the batch file it would create a...
  5. Batch Files

    in Windows 10 Network and Sharing
    Batch Files: I cannot remember how to open a FILE browser in batch, i was trying to create something were it opens a file browser, and the file you click on, gets deleted. https://answers.microsoft.com/en-us/windows/forum/all/batch-files/335a0e0d-62b0-4615-b303-4a7bb548cc6c"
  6. broken batch files

    in Windows 10 Installation and Upgrade
    broken batch files: ok, so for a while I have been using a simple script: :top shutdown -a shutdown -s -t 3600 timeout /T 3600 goto top to set a 1 hour shutdown timer, and make it restart if needed with a single click. But after updating to OS build 18956.1000 the file has completely...
  7. Bulk/batch delete tags saved to files

    in Windows 10 Network and Sharing
    Bulk/batch delete tags saved to files: Is there a way to batch or bulk delete tags added to files. Either all of the same tag in a lot of files, or all tags from a batch or group of files. Or even to change/rename a tag in all files. Anything really. I have a lot of photo files with tags no longer...
  8. batch file

    in Windows 10 Network and Sharing
    batch file: I want a BAT file to be executed when a USB plugged in to the PC. How can I do it? https://answers.microsoft.com/en-us/windows/forum/all/batch-file/1af5ec02-b6c8-4916-959b-ed0327a964e7"
  9. Batch File Help

    in Windows 10 Software and Apps
    Batch File Help: I've never dabbled much in batch files, as I've usually been able to find pre-made ones to do what I wanted. We have an application that handles user data backups. It has three services, and at times, one or two of the three don't start automatically. If you stop and start...
  10. Batch Rename Deletes Files

    in Windows 10 Performance & Maintenance
    Batch Rename Deletes Files: Hey all, I just upgraded to Windows 10 last night, and I've been playing around with the new File Explorer. One thing I tried was the batch rename function (by which I mean just selecting multiple files and clicking "rename"). I quickly realized that it behaves differently...