Saturday, October 3, 2015

windows - Rename multiple files adding a unique string


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.


Answer



In Command Prompt:


for %f in (ERHS*.jpg) do ren "%f" "%~nf_thumb.jpg"

No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...