How can I set an environment variable to the output of a command in a Windows batch file? The command will return a single value of around 32 characters (e.g. type myfile.txt).
Windows – How to set the value of an environment variable to the output of a command in a WIndows batch file
batch filescriptwindows
Best Answer
Temporarily:
Permanently:
Sidenote,
set
sets it just for this command process/window, butsetx
sets it for the whole user/system.