Automate Edit of an INI with a BAT
Posted on 2007-03-30
I need to create a .bat that will modify an .ini. Line 5 in the .ini is static and it needs to be deleted. Line 6 is my variable. On line 6 if there is nothing after the "=" then the entire line needs to be deleted. If there is anything after the "=" then ONLY "NCExtMgr" needs to be deleted and anything else in that line needs to stay. So I need an 'IF' statement that'll delete line 5 if true and then for line 6 either delete it if "EXTMGR_Addins=" exists, otherwise only find and delete "NCExtMgr" if anything exists after the "=".
The .bat I created is rubbish so I need a hand with creating something (start from scratch when replying with a solution - I need to work this from the ground up).