Windows 10: How to create a BAT file that finds and deletes all files with the same extension

Discus and support How to create a BAT file that finds and deletes all files with the same extension in Windows 10 Network and Sharing to solve the problem; How to create a BAT file when is possible that finds and deletes all files with the same extension in actual directory and all subdirectories?Example:... Discussion in 'Windows 10 Network and Sharing' started by MilanSalka, Feb 12, 2025.

  1. How to create a BAT file that finds and deletes all files with the same extension


    How to create a BAT file when is possible that finds and deletes all files with the same extension in actual directory and all subdirectories?Example: find and delete all BAK files

    :)
     
    MilanSalka, Feb 12, 2025
    #1
  2. NinjaNife Win User

    BAT File That Deletes Files Below Specific Size

    I am wondering how to make a bat file that can delete all files below a certain size (in this case 10kb). I have a folder on my server that has game screenshots in it (taken by Punkbuster) and need to sort out the good shots from the bad, and figure this is easier than manually deleting thousands of files.. The "bad" shots (blanks with failed renders) range in size from 4kb-8kb, so the bat file can delete anything lower than 10kb with no issues. Is this possible, and if so how do I make one? Thanks for your help.


    *EDIT*
    I have found a bat file that can delete specific types/sizes, but it only allows you to delete file sizes of 0kb (empty text documents and such), and replacing the "0" with "10" or any other number hasn't worked for me so far.
     
    NinjaNife, Feb 12, 2025
    #2
  3. BAT file/Script to find and replace files

    Hey all....

    Can someone help me make the BAT script in the 2nd post above to be able to use MORE than "1" file?
    As it currently is, you can only replace one particular file.

    For example, I want in the command line to be able to write two files or more, and the script will find and replace all those 2 or more named files.
    Thanks much.

    P.S.... Is there a GUI that does file searching and replacing?
    I've spent hours searching on the net, and the only thing I can find are "text" search/replace and this BAT command, not actual "file" replacing. I find this amazing. *Frown How to create a BAT file that finds and deletes all files with the same extension :(
     
    leeuniverse, Feb 12, 2025
    #3
  4. manoruz Win User

    How to create a BAT file that finds and deletes all files with the same extension

    Bat script to find and replace file in multiple subfolders

    Hello Everyone

    I've searched the forums for an answer specific to my current problem but can't seem to find the proper thing so sorry for opening a new thread (noob)

    I need to create a bat file that will scan multiple folders on my second harddrive D:\- find a file called renamed1.sin - delete it and replace it with a similar file I already have which is smaller in size and has different attributes i.e read only
    The folder structure for the intended file is like this -
    User\documents\rmdw 13\command0\renamed1.sin

    so the batch file would need to scan d:\ - find all instances of renamed1.sin - delete it and replace it with another renamed1.sin which is smaller and real only.

    Any help will be greatly apprecaited
     
    manoruz, Feb 12, 2025
    #4
Thema:

How to create a BAT file that finds and deletes all files with the same extension

Loading...
  1. How to create a BAT file that finds and deletes all files with the same extension - Similar Threads - create BAT file

  2. How to create a BAT file that finds and deletes all files with the same extension

    in Windows 10 Network and Sharing
    How to create a BAT file that finds and deletes all files with the same extension: How to create a BAT file when is possible that finds and deletes all files with the same extension current directory and all subdirectories? https://answers.microsoft.com/en-us/windows/forum/all/how-to-create-a-bat-file-that-finds-and-deletes/29397cf1-180e-464a-aa09-bbfd19f0f8d3
  3. How to create a BAT file that finds and deletes all files with the same extension

    in Windows 10 Gaming
    How to create a BAT file that finds and deletes all files with the same extension: How to create a BAT file when is possible that finds and deletes all files with the same extension in actual directory and all subdirectories?Example: find and delete all BAK files...
  4. How to create a BAT file that finds and deletes all files with the same extension

    in Windows 10 Software and Apps
    How to create a BAT file that finds and deletes all files with the same extension: How to create a BAT file when is possible that finds and deletes all files with the same extension in actual directory and all subdirectories?Example: find and delete all BAK files...
  5. Bat file request for delete temporary files.

    in Windows 10 Software and Apps
    Bat file request for delete temporary files.: Hello. As the title suggests, I would like to create a bat file to delete temporary files, but not being an expert in windows commands, I would like to ask if anyone has the kindness and patience to write one command that it deletes all files in the specific folders and...
  6. How to find the "open with" option for .bat files

    in Windows 10 Gaming
    How to find the "open with" option for .bat files: Hi, I don't find the "open with" for .bat files option in the context menu.In the default apps I didn't find the .bat file change option.I want the file to open in Anaconda prompt and not in Windows terminal when I double click on it.Thank you for your help...
  7. How to find the "open with" option for .bat files

    in Windows 10 Software and Apps
    How to find the "open with" option for .bat files: Hi, I don't find the "open with" for .bat files option in the context menu.In the default apps I didn't find the .bat file change option.I want the file to open in Anaconda prompt and not in Windows terminal when I double click on it.Thank you for your help...
  8. Shortcut to all files with same extension e.g., *.docx

    in Windows 10 Network and Sharing
    Shortcut to all files with same extension e.g., *.docx: Hi ExpertsI would like to have a shortcut that shows me all files with an extension of, say *.docx, located in this folder and all its subfolders.Any way to do that?Thanks - jdballou...
  9. Shortcut to all files with same extension e.g., *.docx

    in Windows 10 Gaming
    Shortcut to all files with same extension e.g., *.docx: Hi ExpertsI would like to have a shortcut that shows me all files with an extension of, say *.docx, located in this folder and all its subfolders.Any way to do that?Thanks - jdballou...
  10. Shortcut to all files with same extension e.g., *.docx

    in Windows 10 Software and Apps
    Shortcut to all files with same extension e.g., *.docx: Hi ExpertsI would like to have a shortcut that shows me all files with an extension of, say *.docx, located in this folder and all its subfolders.Any way to do that?Thanks - jdballou...