James
James

Reputation: 237

How to SET a VARIABLE while running a Batch file

I would like to know how to SET a variable in a batch file while it is running

E.g.

Enter variable name: test

Then I can call this variable later on e.g. %test%

Upvotes: 0

Views: 349

Answers (1)

aphoria
aphoria

Reputation: 20179

Try this:

SET /P TEST=Enter variable name:

Upvotes: 2

Related Questions