-1

I want search in the text file and copy contents in value of variable my text file name is pass and that's content is only 123 i want var value be 123

set var=123
Mr.alone92
  • 11
  • 3

1 Answers1

0
REM write to file:
(echo 123)>pass
REM read from file:
<pass set /p var=
REM display value:
echo %var%

this reads the first (or only) line of the file.

Stephan
  • 53,940
  • 10
  • 58
  • 91