How to script renaming multiple files according to a common pattern in DOS?

I have a bunch of image files named like this:

  GOPR0059 01_pt.jpg
  GOPR0059 02_pt.jpg
  GOPR0059 03_pt.jpg
  GOPR0059 04_pt.jpg
  GOPR0059 05_pt.jpg
  GOPR0059 06_pt.jpg
  GOPR0059 07_pt.jpg

      

so on

I would like to rename these files to these

IMG_1.jpg
IMG_2.jpg
IMG_3.jpg
IMG_4.jpg
IMG_5.jpg
IMG_6.jpg
IMG_7.jpg

      

I don't get a REN command in dos to work for this.

+3


source to share


1 answer


Try the following:

REN "GOPR0059 *_pt.jpg" "IMG_*.jpg"



This won't give you exactly what you need because of the leading 0, but it should go in the right direction

+3


source







All Articles