How do I read only the first line of a text file using batch
Posted on 2010-09-13
what I'm trying to do is have a batch file check mulitple files if it finds the string I'm looking for on
the first line of the file move it to a specific location. The below code works but if it finds F44Q
anywhere inside the file it moves it. The first line contains the code of where to move it.
findstr /m "F44Q" * >F44Q.TXT
for /f %%A in (F44Q.txt) DO MOVE %%A C:\EOM\ORGS\F44Q\