John Taylor
John Taylor

Reputation: 163

How to write the command line input into the command in batch?

I want to run the command

ex.exe property

where 'property' is the text which I first enter from the command line. How to write such batch script?

Upvotes: 0

Views: 52

Answers (2)

TmTron
TmTron

Reputation: 19381

what you want are command line arguments - e.g. the first one

ex.exe %1

see here for more details

Upvotes: 1

nucleon
nucleon

Reputation: 1158

If I understand you correctly, you want a prompt for a variable value. Try something like:

set /p property=Enter Property:
ex.exe %property%

Upvotes: 1

Related Questions