BATCH - Read Config.iniWhen formatted a certain way, config.ini files can be read by NT batch scripts (windows).
I have to give credit where credit is due. Google found this one for me, and I am including a sample batch file here for reference. [http://www.computing.net] config.ini username=owner
password=mypass readconfig.bat @echo off
for /f "tokens=1,2 delims==" %%a in (config.ini) do ( if %%a==username set username=%%b if %%a==password set password=%%b ) echo %username% echo %password% Karasuro on Feb 2nd, 2012 10:29 pm said: I'm trying to create a mod switcher for Minecraft using DOS. Here's my code so far: http://pastebin.com/BLHQGs69 I need help with using batch to write to a .ini file. Code for writing to .ini starts on line 370. WARNING: running the .bat WILL install directories in your AppData folder. | Related Articles |