I have a log file where the first line is very long and full of strange (ASCII?) characters. There is a timestamp in there that I need to extract so I can rename the file. That line looks like this:
MDF CANwin I , HD¤ ¶ (¶ 21:12:202214:14:44 Q p e™ Ñ 48-375Šš Q ` øš Ñ -001 œ Q @ yœ Ñ Cpz « 𨱌 ÿÿÿÿÿÿ¸ž ðóÿ” ÿÿÿÿÿÿÿTóž àôÿˆ ...
I need to extract the timestamp 21:12:202214:14:44
.
This will only return line1 as "MDF":
@echo off
setlocal enabledelayedexpansion enableextensions
set name=%~n1
set /p line1=< %name%.log
echo %line1%
I realize there are limits to /p but this is the only way I've gotten any output.
Edit: These files are coming from a memorator on a vehicle in Vector Log (.log) format. They are "readable" in Notepad.