Hi! I have a for loop in a *.bat file that looks something like:
SET ENVVARLIST=env-vars-list.txt
FOR /F "tokens=1,* delims==" %%A IN (%ENVVARLIST%) DO (
SETX %%A "%%B"
)
and env-vars-list.txt looks something like:
LIB_ROOT=%~dp0%mylib
it basically has a bunch of environment variables with their paths
The For loop doesn't seem to process the %~dp0%
if I put the command in the For loop it works, but since the environment variables all have different paths it's a bit inconvienient.
Does anyone have a fix for this?