Windows batch command(s) to read first line from text file

batch-filecmd

How can I read the first line from a text file using a Windows batch file? Since the file is large I only want to deal with the first line.

Best Answer

uh? imo this is much simpler

  set /p texte=< file.txt  
  echo %texte%