@echo off for /f "delims=" %%i in (list.txt) do ( setlocal enabledelayedexpansion set str=%%i echo !str! echo %%i endlocal ) pause
@echo off for /f "delims=" %%i in (list.txt) do ( set %str%=%%i echo str=%str% echo %%i )
set %str%=%%i
The only way to learn how to program is to program.