The first answer works for me. I also added 2 lines after the end so that it repeats so that I can observe the active log file without closing or opening it again. I do a lot of debugging for the mods that are used in the game Space Engineers. My version looks like this:
@echo off setlocal EnableDelayedExpansion for /f "delims=" %%x in (SpaceEngineers.log) do ( set "previous=!last!" set "last=%%x" ) echo !previous! timeout 15 /nobreak se_log
The line below stops the batch file interleaving too fast and stops the key bypass. To change the time in seconds, simply change the number "15" to whatever you want. To stop the batch file, just press ctrl + c .
timeout 15 /nobreak
The line below is the name of the batch file that I made it tell CMD to run again.
se_log
source share