I'm trying to line up the text in text file.
This is to line up and display each line for the text file. I've tried my own batch program. But its failed.
file.txt
contains,
Rabbit
Cat
Dog
Cow
Pig
test.bat
contains,
@echo off
cls
for /f "skip=1 tokens=*" %%a In (file.txt) do set "str=%%a" & goto next
:next
echo %str%
pause>nul
Expected output in cmd window when running test.bat
Rabbit
Cat
Dog
Cow
Pig
But the actual output am getting in cmd window,
Cat