Page 1 of 1

Is there a way to pass multiple param value pairs to a batch file

Posted: 27 Jan 2023 03:23
by batchnewbie
Dear all,

Is there a way to pass multiple param value pairs to a batch file, param_value.bat


db_domain="abc.com"
log_archive_dest_1="location=R:\app\oracle\oradata\examplecdb"

to param_value.bat ""db_domain="abc.com " log_archive_dest_1="location=R:\app\oracle\oradata\examplecdb" ""

batch file is supposed for write to empty file like abc.ora as follow:

Code: Select all

db_domain="abc.com"
log_archive_dest_1="location=R:\app\oracle\oradata\examplecdb"

many thanks in advance!

Re: Is there a way to pass multiple param value pairs to a batch file

Posted: 29 Jan 2023 11:03
by rodrigolima
Hello batchnewbie,

It looks like a "ini file"... Look at "How to use ini files in batch files"

In my opinion, using a ini file you gotcha what you want to do!

That´s it! Have a fun with ini files!!!

:D 8) :D

Re: Is there a way to pass multiple param value pairs to a batch file

Posted: 13 Feb 2023 09:00
by gulshan212
Hello this is Gulshan Negi
Yes, there are several ways to pass multiple parameter value pairs to a batch file in Windows. One common method is to use command-line arguments. For example, if you have a batch file named "example.bat" and you want to pass two parameter value pairs to it, "param1=value1" and "param2=value2", you can run the following command:
example.bat param1=value1 param2=value2
Thanks

Re: Is there a way to pass multiple param value pairs to a batch file

Posted: 20 Feb 2023 11:51
by Sponge Belly
Hi Batch Newbie! :)

Please read dbenham’s answer to this Stack Overflow
Question
.

HTH!

- SB