0

I am trying to make a batch file use a string from a text file as a variable. So for instance I have a text file with:

Test

and I want it to return:

Your name is Test 

using an echo command.Is it possible?

Nexrem
  • 111
  • 8

1 Answers1

1

I figured it out. Just did:

(
set /p var=
)<File.txt

Then when I echo %var% I end up with the string in the text file.

Nexrem
  • 111
  • 8