:: DATECHEK.BAT (c) J R Stockton 2003-05-25 :: Tested for UK date format - some needed "-" instead of "/"; :: now: find /v "(". :: Some time formats use different punctuation too. :: for autoexec.bat ; DOS-version-dependent, test with "198" & "199" below. @echo off for %%a in (1 2) do if exist xx.%%a del xx.%%a echo. | date | find "198" > xx.1 copy xx.1 xx.2 > nul if not exist xx.2 goto OK echo Y2K Rollover detected - back in the eighties - correct it NOW !  date time echo. :OK for %%a in (1 2) do if exist xx.%%a del xx.%%a echo. | date | find /v "(" echo. | time | find "." echo OK? GOTO over --- Above needs Copy to NOT copy zero-length files - Win NT, DOS 6.1, 6.3. The following fragment shows an alternative technique for processing the result of "Find" : del b.bat del current.bat echo. | date | find "198" > b.bat echo date > current.bat call b del b.bat del current.bat :over