@echo off rem https://stackoverflow.com/questions/3472631/how-do-i-get-the-day-month-and-year-from-a-windows-cmd-exe-script FOR /F "skip=1 tokens=1-6" %%A IN ('WMIC Path Win32_LocalTime Get Day^,Hour^,Minute^,Month^,Second^,Year /Format:table') DO ( if "%%B" NEQ "" ( SET /A FDATE=%%F*10000+%%D*100+%%A ) ) set year=%FDATE:~0,4% set /p version=