I have a text file with the numbers "10" in it. If I send the command "type blah.txt" 10 comes out. My question is, how do I use the SET command to assign the output from this type command as a variable? I thought, for example, that this would do it:
C:\>type blah.txt | SET certainnumber=
However, when I check, I get this.
C:\>ECHO %certainnumber%
%certainnumber%
How do I get the output from the type command to pipeline into the SET command?message edited by link9454
Scratch this, I figured it out. Rather then use the pipeline or anything like that, just use the text file itself.
SET /p certainnumber=<blah.txt
Yes (14) | ![]() | |
No (14) | ![]() | |
I don't know (15) | ![]() |