@echo off echo Date format = %date% setlocal enabledelayedexpansion set cnt=0 for %%i in (*.mcl) do ( set "num=%%~ni" if !num! GTR !cnt! set cnt=!num! ) set /a olddate=cnt set /a olddate2=cnt-1 py -2 update_missing.py %olddate%.mcl %date:~6,4%%date:~3,2%%date:~0,2%.mcl 9718933c0a3aa4407d6995d0f3bb310f5ee977f2 %olddate2:~0,4%-%olddate2:~4,2%-%olddate2:~6,2% %date:~6,4%-%date:~3,2%-%date:~0,2%