Posted: 1/18/2026 2:54:52 PM EDT
[Last Edit: -SkyRaider-][Edited]
|
Say I have the following files in a folder: Bubba_01.jpg Bubba_02.jpg Bubba_03.jpg Bubba_04.jpg ...and I want to change the filenames to: Bubba_Gump_01.jpg Bubba_Gump_02.jpg Bubba_Gump_03.jpg Bubba_Gump_04.jpg If I select all 4 files, then select the file at the top and add the "_Gump" via the "rename" menu item, the result is: Bubba_Gump_01 (1).jpg Bubba_Gump_02 (2).jpg Bubba_Gump_03 (3).jpg Bubba_Gump_04 (4).jpg Is there a way to not have the " (x)" automatically appended? Thanks for any replies. |
1. Formerly "Sig_Prude".
2. I am not a pilot.
3. I have never served in the military.
4. Thank you for your service.
2. I am not a pilot.
3. I have never served in the military.
4. Thank you for your service.
|
This would be a great question for ChatGPT, Gemini, grok, etc. Literally copy and paste your post into the AI chat of your choice just the way you formulated it here. It will give you the answers and step by step instructions. or if it's not possible, it will tell you what the available options are. I'm not trying to be a dick. If this isn't the kind of thing you have the reflex to ask AI yet, then you're getting left behind. Even just "googling" such a problem gives you at best someone's similar problem on reddit or stack overflow and you have to try to adapt their solution to you situation. AI will tailor make the solution and walk you through it and you can ask follow up questions. I imagine one possible solution will be to write a simple batch file. |
Joined:
Jun 2024
Posts:
473
EE: 100% (371)
|
Gemini's response as an example, but it would be easier to give Gemini your actual file names instead of the example of "Bubba": Using a batch file (.bat) is a classic and effective way to do this in Windows 11 without installing any extra software. The command used in batch files for renaming is ren (or rename). However, because you are inserting text in the middle of a filename, a simple "wildcard" rename won't work perfectly it would likely overwrite the numbers. Instead, we use a small loop. The Batch Script 1. Open Notepad. 2. Copy and paste the following code: @echo off setlocal enabledelayedexpansion for %%f in (Bubba_*.jpg) do ( set "filename=%%f" set "newname=!filename:Bubba_=Bubba_Gump_!" ren "%%f" "!newname!" ) pause 1. In Notepad, go to File ... Save As. 2. Navigate to the folder where your images are located. 3. Change "Save as type" to All Files (.). 4. Name the file rename_images.bat and click Save. 5. Double-click the rename_images.bat file in your folder. A Quick Warning Batch files are powerful and don't have an "Undo" button. Before running it, it's always a good idea to copy your 4 files into a "Test" folder just to make sure the script behaves exactly how you expect! Would you like me to modify the script so it can handle any prefix you type in, rather than just "Bubba"? |
|
Also from Gemini: You can also use a quick command. This looks technical but is just a "Find and Replace" for filenames. 1. Open the folder containing your files. 2. Right-click in the empty space of the folder and select Open in Terminal (this opens PowerShell). 3. Copy and paste the following command and press Enter: Get-ChildItem -Filter "Bubba_*.jpg" | Rename-Item -NewName { $_.Name -replace 'Bubba_','Bubba_Gump_' } |
|
Originally Posted By Daggertt: Also from Gemini: You can also use a quick command. This looks technical but is just a "Find and Replace" for filenames. 1. Open the folder containing your files. 2. Right-click in the empty space of the folder and select Open in Terminal (this opens PowerShell). 3. Copy and paste the following command and press Enter: Originally Posted By Daggertt: Also from Gemini: You can also use a quick command. This looks technical but is just a "Find and Replace" for filenames. 1. Open the folder containing your files. 2. Right-click in the empty space of the folder and select Open in Terminal (this opens PowerShell). 3. Copy and paste the following command and press Enter: Get-ChildItem -Filter "Bubba_*.jpg" | Rename-Item -NewName { $_.Name -replace 'Bubba_','Bubba_Gump_' } |
In the beginning, the universe was created. This made a lot of people very angry, and has been widely regarded as a bad move. -Douglas Adams
|
Originally Posted By Daggertt: This would be a great question for ChatGPT, Gemini, grok, etc. Literally copy and paste your post into the AI chat of your choice just the way you formulated it here. It will give you the answers and step by step instructions. or if it's not possible, it will tell you what the available options are. I'm not trying to be a dick. If this isn't the kind of thing you have the reflex to ask AI yet, then you're getting left behind. Even just "googling" such a problem gives you at best someone's similar problem on reddit or stack overflow and you have to try to adapt their solution to you situation. AI will tailor make the solution and walk you through it and you can ask follow up questions. I imagine one possible solution will be to write a simple batch file. @Daggertt I ran it through ChatGPT, which pointed me in the direction of PowerToys: "Option 3: Use a bulk renaming tool If you do this often: Microsoft PowerToys → PowerRename (official, free) Lets you insert text without auto-numbering Bulk Rename Utility (very powerful, free) PowerRename example: Search: Bubba Replace: Bubba_Gump Disable numbering entirely" |
1. Formerly "Sig_Prude".
2. I am not a pilot.
3. I have never served in the military.
4. Thank you for your service.
2. I am not a pilot.
3. I have never served in the military.
4. Thank you for your service.
|
Could just do a one-liner in PS (always run with -WhatIf to make sure it's going to do what you want without destroying anything first). Get-ChildItem -Path 'C:\Path\To\Files' -Filter '*.jpg' | Rename-Item -NewName {$_.Name -replace 'Bubba_', 'Bubba_Gump_'} -WhatIf
|
|
Originally Posted By -SkyRaider-: @Daggertt I ran it through ChatGPT, which pointed me in the direction of PowerToys: "Option 3: Use a bulk renaming tool If you do this often: Microsoft PowerToys PowerRename (official, free) Lets you insert text without auto-numbering Bulk Rename Utility (very powerful, free) PowerRename example: Search: Bubba Replace: Bubba_Gump Disable numbering entirely" But it looks like that was already option 3 that it proposed. Did it work for you? |
|
This is the app you seek. Bulk File Rename I use it all the time. Lets you see the change before committing. If you are asking, scripting is not what you want to be doing. |