I am currently having a problem. This one seemed to be pretty well covered but all the answers I found have not been working for me. What I want to do is this. I have a text file with multiple lines. I want to concat all of those to a string like
[LINE1]\n[LINE2]\n[LINE3]...
Now the answer for looping through the lines of a file I found were pretty understandable
for /F "delims=" %%i in (filename.key) do set content=%content% %%i
Now the problem is, that my batch file does loop through the file but %content%
seems to be empty in every loop. So after all is done content just matches the last line of my file. What am I doing wrong?