views:

57

answers:

1

how to read from a file in batch and set it as variable under MSDos 6.22 (windows 3.11) i have tried

set /p var= < text.txt

have also tried

for /f %%a in (text.txt) do (command)

both is work only in windows xp, can anybody suggest in windows 3.11?

+2  A: 

Reading Text Files into MS-DOS Environment Variables

Applies to: ... Microsoft MS-DOS 6.22 Standard Edition

So the environment variable becomes an intermediary step so you can get the contents from a text file to a variable in some batch file.

micahwittman