Solved Batch file required

val5662

New member
Local time
6:10 AM
Messages
10
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!
Val
 

My Computer

Computer type
PC/Desktop
OS
Windows 7 ultimate 32bit
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 Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Lenovo IdeaCenter 450
OS
Windows 10 Pro X64
CPU
Intel Quad Core i7-4770 @ 3.4Ghz
Memory
16.0GB PC3-12800 DDR3 SDRAM 1600 MHz
Graphics Card(s)
Intel Integrated HD Graphics
Sound Card
Realtek HD Audio
Monitor(s) Displays
HP 22" LCD
Screen Resolution
1680 x 1050
Hard Drives
250GB Samsung EVO SATA-3 SSD
2TB Seagate ST2000DM001 SATA-2
1.5TB Seagate ST3150041AS SATA
Keyboard
Dell USB
Mouse
Lenovo USB
Internet Speed
Cable via Road Runner 3MB Upload, 30MB Download
Antivirus
Windows Defender, MBAM Pro, MBAE
Browser
Seamonkey
Other Info
UEFI/GPT
PLDS DVD-RW DH16AERSH
:: THIS BATCH FILE WILL REPLACE A COMPLETE LINE OF TEXT
:: IN ANY NOTEPAD TYPE FILE BY CHANGING THE "equ 3" WHICH MEANS
:: LINE 3 -- COUNTING FROM THE TOP OF THE FILE.
@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!
Val
 

My Computer

Computer type
PC/Desktop
OS
Windows 7 ultimate 32bit
Back
Top