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?

issac
  • 125
  • 1
  • 1
  • 6
  • Wow really 3.11? Isnt that like 10+ years out of support by now? Not critiquing your question I am just surprised that it is still in use. – GrayWizardx Dec 22 '09 at 07:28
  • we have questions about commodore 64, so why not ? :) – Stefano Borini Dec 22 '09 at 07:48
  • issac, you seem to have two questions (without accepted answers) on the subject of Windows 3.1, but you made two accounts, one for each, with the same name. Try to use only one account, makes it easier for you (see your own history) and others (finding you). – Abel Dec 27 '09 at 23:28

1 Answers1

2

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.

Community
  • 1
  • 1
micahwittman
  • 12,356
  • 2
  • 32
  • 37