1.

Solve : store a file in a variable?

Answer»

I WANT to store a file that has just ONE number in it, in a variable. How can I do that.

This is what I have:

set var = < changelist.txt
echo The variable is "%var%"


if you mean you want to store the number inside it as a variable , TRY this

FOR /F "tokens=1*" %%a in (yourfile.txt) do set var=%%a

^the above works in a batch file

FOR /F "tokens=1*" %a in (yourfile.txt) do set var=%a/b]

^the above works at the line
thank YOUOR,

Quote

set /p var=<"filename.txt"


Discussion

No Comment Found