There is a txt file, which contains (among many others) strings, which start with:

"HH:MM:SS case"

where H, M, S are hours, minutes and seconds (in 24h format).

There are .jpg files, with names HHMMSS.jpg or HHMMSSxy.jpg (where x, y are digits and/or letters).

How to delete all HHMMSS\*.jpg files, which names do NOT correspond with strings "HH:MM:SS case" in .txt file? I can easily find all existing "HH:MM:SS case" strings in .txt file, but do not know, what next. 

The dos batch will be used on a XP machine.

P.S. Dear people, I know nothing about scripting. It is not my world. I understand you are not "scripting company" but I hope this is very simple for people, who know the thing.

What I did.

I can find all these strings by: findstr /r /c:"..:..:.. case"

I can put them into another .txt file by adding at the end: > file.txt

I tried few codes with "for" command, but the syntax is too complex for me.

I know how to transform HH:MM:SS into HHMMSS (and make another txt file with these).

I have found some codes to delete files from dir according to a list in txt file.

But I feel this is very crude way.