When inside a for loop, the set command doesn't set the string variable, whereas outside it works fine. I would like it to export to a .txt file directly after storing, and that works fine. Here is the code:
For /l %%a in (1,1,5) do (
set /p string="StringIn %%a:"
echo %string %>> string_list.txt
)
Start string_list.txt