I have the following batch code below to scan the attached file to remove hours within the file. This is a music log with songs scheduled for a 24 hour period. The problem is that the batch command worked when the lines had quotes around the hours. This new log does not use quotes.
So I need the below edited to scan for and remove hour lines 05:00:00 - 10:00:00 from the attached. Right now it looks for the quotes, which do not exist in the new music log files (attached). I also need the code to output the final file as the same filename, but with the .asc extension.
if exist "%OutFile%" del "%OutFile%"
for /f "delims=" %%a in ('type "%InFile%"') do (
set /a Hour=1!Time:~1,2!
if "!Hour!" LSS "150" set Print=1
if "!Hour!" GTR "111" set Print=1
if !Print!==1 (
>>"%OutFile%" echo %%a