What separator to use in a FOR loop to read lines?

I have a txt file containing the following lines

jfo3 93jfl
lvls 29fdj
nskd jfuwe
xlkw eklwe

I am trying to read a file line by line and do something with it. Which separator should I use?

The divide that I use here reads each word separately.

@echo off
setlocal EnableDelayedExpansion
for /f "delims=" %%x in (lines.txt) do (
    echo %%x
)
+5
source share
3 answers

This reads line by line for me:

for /f "delims=" %x in (lines.txt) do echo %x
+11
source

The problem is not related to delims, but with tokens:

for /f "tokens=*" %%x in (lines.txt) do echo %%x
+1
source

:

,

GHI, JKL

MnO, PQR

FOR /F "tokens=1,2,3 delims=," %%i in (test.txt) do (whatever u want) 
0

All Articles