How do we use a batch for loop to read a text file

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Locked
Message
Author
Sam Johnson
Posts: 1
Joined: 20 Jul 2012 05:02

How do we use a batch for loop to read a text file

#1 Post by Sam Johnson » 20 Jul 2012 11:50

How do we use a batch for loop to read a text file, sman.txt?

Squashman
Expert
Posts: 4488
Joined: 23 Dec 2011 13:59

Re: How do we use a batch for loop to read a text file

#2 Post by Squashman » 20 Jul 2012 12:05

Sam Johnson wrote:How do we use a batch for loop to read a text file, sman.txt?

HI Bill, You probably shouldn't have called your file sman.txt
Now we know it is you again.

Code: Select all

FOR /F "delims=" %%G in (sman.txt) do echo %%G

Ed Dyreen
Expert
Posts: 1569
Joined: 16 May 2011 08:21
Location: Flanders(Belgium)
Contact:

Re: How do we use a batch for loop to read a text file

#3 Post by Ed Dyreen » 20 Jul 2012 12:16

'
banned Sam Johnson aka billrich, ( thanks for reporting ).

Locked