Or, if you just want to put the result in a file (as opposed to storing it in memory for some purpose), you can do something like this:
@ECHO OFF
TYPE NUL >output.txt
FOR /F %%L IN (input.txt) DO (
IF NOT "%%L" == "END" (<NUL >>output.txt SET /P "=%%L")
)
ECHO.>>output.txt
, , , , .