How to create a batch file that read parameters from another file -
omeone help me create batch file read 3 parameters file e.g. config.conf in same directory?
the config file contains next information:
--url="jdbc:oracle:thin:@192.168.0.91:1521:xe" --username=testuser01 --password=passowrd01
i need set 3 prameters %url% , %username% , %pwd% in mig.bat file, working there parameters.
thanks , regards
if on 1 line , in same order...
@echo off setlocal set "cfgfile=c:\test.cfg" /f "tokens=2,4,6 delims==- " %%a in ('type "%cfgfile%"^| find /i "url"') ( set "url=%%~a" set "user=%%~b" set "pass=%%~c" ) echo %url% %user% %pass% endlocal
batch-file parameters parameter-passing configuration-files
No comments:
Post a Comment