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

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
 
S

Squire

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

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

Venugopal

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
 
D

David Candy

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top