Can anyone point me in the right direction as to why after I select C and D that it still changes the ini.file to A?
It does not appear to be making the changes required if C or D are selected.
Sorry, I am new to this which I am sure you can tell from the code below.from the batch file.
@echo off
set /p input="Press A for default:\,Press C for arundel:\,Press D for Durrington: A,B,C:"
if %input%==A goto :A
if %input%==C goto :C
if %input%==D goto :D
:A
setlocal enabledelayedexpansion
for /f "tokens=* delims=" %%i in (TEST.ini) do (
set input=%%i
set input=!input:ARU-SUP=SUO-SUP!
del test.ini
echo !input! >> test.ini
echo !input! >> test.ini.old
goto :end
)
ren DataFile.ini DataFile.ini.old
ren DataFile.ini.chg DataFile.ini
goto :end
:C
setlocal enabledelayedexpansion
for /f "tokens=* delims=" %%i in (TEST.ini) do (
set input=%%i
set input=!input:ARU-SUP=cch-SUP!
del test.ini
echo !input! >> test.ini
echo !input! >> test.ini.old
)
ren DataFile.ini DataFile.ini.old
ren DataFile.ini.chg DataFile.ini
goto :end
:D
setlocal enabledelayedexpansion
for /f "tokens=* delims=" %%i in (TEST.ini) do (
set input=%%i
set input=!input:ARU-SUP=dur-SUP!
del test.ini
echo !input! >> test.ini
echo !input! >> test.ini.old
)
ren DataFile.ini DataFile.ini.old
ren DataFile.ini.chg DataFile.ini
goto end
:end
rem c = Arundel
rem d = Durrington
It does not appear to be making the changes required if C or D are selected.
Sorry, I am new to this which I am sure you can tell from the code below.from the batch file.
@echo off
set /p input="Press A for default:\,Press C for arundel:\,Press D for Durrington: A,B,C:"
if %input%==A goto :A
if %input%==C goto :C
if %input%==D goto :D
:A
setlocal enabledelayedexpansion
for /f "tokens=* delims=" %%i in (TEST.ini) do (
set input=%%i
set input=!input:ARU-SUP=SUO-SUP!
del test.ini
echo !input! >> test.ini
echo !input! >> test.ini.old
goto :end
)
ren DataFile.ini DataFile.ini.old
ren DataFile.ini.chg DataFile.ini
goto :end
:C
setlocal enabledelayedexpansion
for /f "tokens=* delims=" %%i in (TEST.ini) do (
set input=%%i
set input=!input:ARU-SUP=cch-SUP!
del test.ini
echo !input! >> test.ini
echo !input! >> test.ini.old
)
ren DataFile.ini DataFile.ini.old
ren DataFile.ini.chg DataFile.ini
goto :end
:D
setlocal enabledelayedexpansion
for /f "tokens=* delims=" %%i in (TEST.ini) do (
set input=%%i
set input=!input:ARU-SUP=dur-SUP!
del test.ini
echo !input! >> test.ini
echo !input! >> test.ini.old
)
ren DataFile.ini DataFile.ini.old
ren DataFile.ini.chg DataFile.ini
goto end
:end
rem c = Arundel
rem d = Durrington