How to rename files in a batch file.

Post up anything you would like to talk about here.
Post Reply
User avatar
Cyril
House Steiner Warrant Officer First Class
House Steiner Warrant Officer First Class
Posts: 357
Joined: Tue Jan 22, 2008 4:04 pm
Location: Richmond, VA

How to rename files in a batch file.

Post by Cyril »

very nice, thank you.


i dont supposed you know how to do a bat that will switch the names of two files?
Image
Image
User avatar
Archon
House Liao Private for Life
Posts: 102
Joined: Thu Jul 24, 2008 8:08 am
Location: AZ

Re: CPU Affinity Batch File

Post by Archon »

Fear I don't quite get what you mean. Like just tell it to rename a file?

If that IS what you mean, just

ren OLDNAME NEWNAME

But that seems kinda silly? You can do that in windows easier. So I ask again -- what do you actually mean? lol
User avatar
Cyril
House Steiner Warrant Officer First Class
House Steiner Warrant Officer First Class
Posts: 357
Joined: Tue Jan 22, 2008 4:04 pm
Location: Richmond, VA

Re: CPU Affinity Batch File

Post by Cyril »

ok highlander has a mod for netmech wich i quite like. but others don't, and to is a pain to switch back and forwarth.

highlander's fix is to install netmech twice to have have one modded and one normal. i dont like that.


now to use the mod. i have to use the files he has provided in my netmech diretory, and named to what the orginal files were named to. thus i have to change the orginal files' name to NETMW2.EXE.bak and MW2SHELL.EXE.back

and the mods to the orginal names NETMW@.EXE and MW2SHELL.EXE


it would be nice to have a batch to switch the two,,,or two bats that do, "mod on" and "mod off"
Image
Image
User avatar
Archon
House Liao Private for Life
Posts: 102
Joined: Thu Jul 24, 2008 8:08 am
Location: AZ

Re: CPU Affinity Batch File

Post by Archon »

Yeah, that's easy enough, just rename highlander's mod files to like "NETMW2.exe.high" and "MW2SHELL.exe.high", and then have something like this:

This will rename the files and enable the mod:

Code: Select all

ren NETMW2.exe NETMW2.exe.bak
ren MW2SHELL.exe MW2SHELL.exe.bak
ren NETMW2.exe.high NETMW2.exe
ren MW2SHELL.exe.high MW2SHELL.exe
Then you can use this to switch them back:

Code: Select all

ren NETMW2.exe NETMW2.exe.high
ren MW2SHELL.exe MW2SHELL.exe.high
ren NETMW2.exe.bak NETMW2.exe
ren MW2SHELL.exe.bak MW2SHELL.exe
That what you were looking for? Just put the batch files in the netmech directory and you're golden. You can also put them anywhere you like, but then you'd have to include this at the beginning of each:

Code: Select all

cd C:\Progra~1\NetmechDos\
Archon
Post Reply