Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.

Windows 7: Batch file required

22 Aug 2015   #1

Windows 7 ultimate 32bit
Batch file required

Hi guys...
Windows 7 Ultimate 32 bit is my OS.
Please help....thanks!
I need a batch file that is run once from inside the same folder called Config as an "options.cfg" file,part of the text is listed below.I need to change the unknown number that follows the "draw_distance" to the number shown "10.000000".
The minimum and maximum numbers are between 0.000000 and 1.000000 adjustable in an older car racing game options for viewing distance.The complete file must not be replaced as other people racing this game have different settings for multiple options set in game.

@echo off
replace line 3 in options.cfg draw_distance *.* with draw_distance 10.000000
exit /b

Something like the above example ( I know that doesn't work ).

car_texture yes
detail_level 1.000000
draw_distance 10.000000
effects yes
filtering yes
fog no

Thanks again!

My System SpecsSystem Spec
22 Aug 2015   #2

Windows 10 Pro X64

The easiest way to do this is to have multiple options.cfg files, one for each user, customized as they want it then the batch file would simply copy the correct options.cfg_name (or whatever you want to call them) over options.cfg then start the game.
My System SpecsSystem Spec
22 Aug 2015   #3

Windows 7 ultimate 32bit

@echo off
color 0a
ren options.cfg copy-of-options.cfg
(for /F "tokens=1* delims=:" %%a in ('findstr /N "^" copy-of-options.cfg') do (
if %%a equ 3 (
echo draw_distance 10.000000
) else (
echo %%b
)) > options.cfg

The file in question was called "options.cfg"
This code worked 100%.
It was answered by Aacini in another forum.
Thanks anyway guys!
My System SpecsSystem Spec


 Batch file required

Thread Tools

Similar help and support threads
Thread Forum
Batch File .bat to copy file from File Sharing & FTP Hosting
Hi all, Any idea how to write Batch File .bat to copy file from File Sharing & FTP Hosting to local directory. Current the File Sharing & FTP Hosting is SMARTFILE. I don't want to use WINSCP as the connector. Thanks
General Discussion
Please help me with Batch, need manual input required see description
Hi there, I am trying to create a batch file which will use the command nbtstat-a and then request the IP of the user within the same line (e.g. nbtstat-a *please enter the target IP to lookup*) to look up the machine name of a computer on the network, the only problem is that i dont know how to...
General Discussion
How to run a batch file at logoff & some batch scripting help please
Hiya, I'd just like to run a simple batch file at logoff to backup some settings. I plan to use Robocopy, which is what i use to more thorough backups. Two questions: 1. How make it run by clicking Start > Shutdown? (i realise i could make a shutdown batch file and run it instead, but i'd...
Backup and Restore
Batch File that grabs file names from folder to insert into batch file
Ok I'm totally at a loss on how to word this so I'm just going to write it out the best that I can... :confused: First I have a batch file that I'm writing that will convert mp4 files to mp3 files (I have a lot) for a buddies band using ffmpeg. Here's the code that I'm using: ffmpeg -i...
General Discussion
batch file open file for program in the startup folder
I have a computer that is a drone specifically for an outside LED sign. This computer is designed to never shut off and doesn't have any other program on it besides Operating System and the sign software. I need to create a batch file that I can place in the "start-up" folder that will open the...
General Discussion
How to create a batch file that will move files based on the file type
How to create a batch file that will move files based on the file type? My Requirement : I need a batch file to copy all .doc files in all my HardDisk to a removable disk say (Z: drive) . Can anyone make it possible using a batch file?Please...Its urgent...
General Discussion

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 19:11.
Twitter Facebook Google+ Seven Forums iOS App Seven Forums Android App