I have a bacthfile & I want to pass parameter values, how can I do it ?
@echo off
ECHO Param1: Database Name: %1
ECHO Param2: Datasource : %2
ECHO Param3: DB User Id: %3
ECHO Param4: Password: %4
SET DBNAME=%1
SET DBSERVER=%2
SET DBUSER=%3
SET PASSWORD=%4
values which I want to set are DBNAME, DBSERVER, DBUSER and PASSWORDare parameters for batch file ?
You just pass parameters to a batch file by appending them to the end of the file name, with a space between each parameter:
And if you need to pass spaces in a parameter, just surround it in quotes:
And if you need to remove those quotes in FOO.BAT you can use
~notation: