Renaming files with of the format *.suffix1.suffix2 in batch mode

  • Thread starter Thread starter Venugopal
  • Start date Start date
V

Venugopal

Hi,

I have to rename a batch of files in the format *.suffix1.suffix2
to *.suffix3 Tried using the REN command under command line.
Seems to have trouble with the filenames with more than one suffix.
Any easy way to handle this?

Thanking in advance.

Venugopal
 
Try going a little farther with the wild card "*"

In the directory of files to be changed,
Try typing : ren *.* *.3
 
Hi David,

Thanks! What I needed was something slightly different.
I need to rename a file blabla.ftypeold.bak to blabla.ftypenew
So, I need to be able to get the file name in to the variable %A
so that I can append the new file type and rename the file.

Thanks,
Venu
 
Type For /? and look at the bottom of help, the %~nA and friends. Remember the extension is the text after the LAST period. The rest is the name.
 
Back
Top