@echo off
set logdir=..\log\
cd /d "%~dp0"
for /f "usebackq delims=" %%f in (`dir /b /o-d %logdir%`) do @(
	set lastlog=%%f
	goto last;
)
:last

findstr /C:"HID Device not found." %logdir%%lastlog%
if not errorlevel 1 exit /b 0

findstr /C:"No USB-SERIAL Device Detected." %logdir%%lastlog%
