Shortest Windows batch file code to get first line of a file set to a variable?
set /p var= <Text.txt
echo %var%
Referenced from: http://forums.techguy.org/software-development/551867-batch-file-read-line-text.html Ironically the poster is able to get the first line but wanted to loop through the whole file!
This is just a slightly shorter version:
set/pz=<file
echo %z%