FINDSTR in last line of a logfile

Microsoft Windows server 2003 enterprise
January 24, 2010 at 23:35:51
Specs: Windows XP
Hello @ll,

I think I have read all the codeing examples with batch syntax, but my script don't work. I will write a batchscript that will find a string in the last line of a logfile. The last line must have the string "Execution finished". Have someone an idea? Thanks for you support and sorry for my bad english. CU cawx

See More: FINDSTR in last line of a logfile

Report •

January 25, 2010 at 00:56:51
@echo off & setLocal EnableDELAYedeXpansion

for /f "tokens=* delims= " %%a in (my.log) do (
set S=%%a
echo !S! | find "Execution finished" > nul
if errorlevel 1 echo not there
if not errorlevel 1 echo got it

Helping others achieve escape felicity


Report •

January 25, 2010 at 01:14:34
That's what I am searching for. It works, thank you so much for you help. CU cawx

Report •

Related Solutions

Ask Question