Set an environment variable from a text file contentTag(s): Misc Prog HowTo
Let's say we have the following text file.
[howto.txt]
this is an interesting howto
[howoto.cmd]
@echo off SetLocal EnableDelayedExpansion set content= for /F "delims=" %%i in (howto.txt) do set content=!content!%%i echo %content% EndLocal
> howto.cmd this is an interesting howto