|The script below shows how to find today's image_*.zip if there is one. I'll leave it to you to hammer out the rest.|
I can't think why you'd rename a zip to a txt, but it's your script.
:: find today's image_*.zip
@echo off > %temp%\# & setLocal EnableDelayedExpansion
for /f "tokens=1 delims=" %%a in ('dir/s/b %temp%\#') do (
echo datetime is !datetime!
for /f "tokens=1 delims= " %%a in ("!datetime!") do (
echo today is !today!
for /f "tokens=* delims=" %%a in ('dir/b image_*.zip') do (
for /f "tokens=1 delims=" %%i in ("%%a") do (
for /f "tokens=1 delims= " %%j in ("!zipdtime!") do (
if !zipdate! equ !today! (
echo %%a is today's zip
If at first you don't succeed, you're about average.