Search found 1 match
- 06 Jun 2021 14:34
- Forum: DOS Batch Forum
- Topic: Can SET be filled by a command?
- Replies: 7
- Views: 8114
Re: Can SET be filled by a command?
Yes, FOR /F is generally how it is done. The only other option is to redirect the output of your command to a temp file, and then read the result with SET /P using redirected input. >temp.txt echo Example command output <temp.txt set /p var= del temp.txt echo var=%var% You might think you could pip...