try this:
@echo off
for /F "tokens=1,2*" %%x in (myFile.txt) do echo %%x
the double %
is required for use in a batch file, but you can test it on the cmd line with single %
s.
in a nutshell, the for
will iterate over myFile.txt
break each line into two tokens using the default delimiter (space).