1.

Solve : setting text file into variables?

Answer»

im TRYING to remember how to set multiple line TEXT files into variables, any idea why this wont work?

for /f "tokens=1 delims=*" %%a in (config.txt) do (
call set /a c=%c%+1
call set c.%c%=%%a
)You can also do this with delayed expansion, but coyote ugly also works:

CODE: [Select]@echo off
for /f "tokens=* delims=" %%a in (config.txt) do (
call set /a c=%%c%%+1
call set c.%%c%%=%%a
)

Happy coding. THANKS again SIDEWINDER



Discussion

No Comment Found