I am trying to create batch script which can take multiple inputs from user & then create file & save all the inputs in that file. Below is the code i created but it id not working. Can you please help me.
@echo off
set /P inst=Enter number of installation:
set /A ha_inst=%inst%
FOR /L %%i IN (1,1,%ha_inst%) DO (
set /P hostname= Enter host name:
set /P sid=Enter SID:
echo. >C:\Users\smnadm\Desktop\hdbinst.cfg_%%i
(
echo # Local Host Name
echo hostname=%hostname%
echo # SAP HANA System ID
echo sid=%sid%
) >C:\Users\smnadm\Desktop\%hdbinst.cfg_%%i%
)
Thanks