I am running into an issue here on Windows 10. I am trying to set an environment variable within the batch file using a for ... in ... do
, but it never finds the file folder I am looking for.
example:
cd \temp
for /f "delims=" %%a in ('dir /b /ad somefolder*') do set somefolder=%%a
cd \temp\%somefolder%\microsoft
When run as an administrator I will get an error: file not found
. When run as non-admin it functions properly. This can only be run as a batch while using DISM.