Batch script to rename portionof a filename

Posted by Rubik'sCube on Super User See other posts from Super User or by Rubik'sCube
Published on 2012-11-16T03:19:14Z Indexed on 2012/11/16 5:03 UTC
Read the original article Hit count: 464

Filed under:
|
|

I've been trying to make a script that will a file name and change only one word in it.

An example would be:

projectname.vcproj.domainname.username.user

to

projectname.vcproj.otherdomainname.username.user

I've tried using the if loop to list the directory and set the delimiter to a period but it doesn't seem to be able to identify and change it. I'm using examples of renaming .txt files but it doesn't seem to work, any suggestions?

© Super User or respective owner

Related posts about batch

Related posts about batch-file