I am using Windows XP operating system, I have a folder with multiple files, e.g.:

  • ERHS 34334.jpg
  • ERHS 12123.jpg
  • ERHS 98484.jpg

I want to rename all those files at once as like below:

  • ERHS 34334_thumb.jpg
  • ERHS 12123_thumb.jpg
  • ERHS 98484_thumb.jpg

Existing name should not change; I want to add some unique string to the end.


In Command Prompt:

for %f in (ERHS*.jpg) do ren "%f" "%~nf_thumb.jpg"
| improve this answer | |

In PowerShell:

Dir ERHS*.jpg | Rename-Item -NewName { $_.name -replace ".jpg", "_thumb.jpg" }

You might need to install PowerShell for Windows XP beforehand.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.