user7064921
user7064921

Reputation:

reading value from a file in batch script

We can set the value of a variable (say, "upper_bound") in a batch file in the following way:

SET upper_bound=3

But is there any way to read this value '3' from a input.txt file which will just contain value 3?

Upvotes: 1

Views: 99

Answers (1)

Compo
Compo

Reputation: 38718

Like this:

SET/P upper_bound=<input.txt

Upvotes: 2

Related Questions