Search found 2 matches

by Ted Turner
19 Jul 2012 11:18
Forum: DOS Batch Forum
Topic: set batch variable to value from text file
Replies: 4
Views: 4905

Re: set batch variable to value from text file

Code: Select all

C:\test>type sman.bat
@echo off
echo DosMaster > sman.txt
set /p var=<sman.txt
echo var=%var%
C:\test>
C:\test>sman.bat
var=DosMaster

C:\test>
by Ted Turner
19 Jul 2012 10:58
Forum: DOS Batch Forum
Topic: set batch variable to value from text file
Replies: 4
Views: 4905

set batch variable to value from text file

How do set batch variable to value from text file?