The following batch script does what you want. Copy the code into a file and call it moveOld.bat, and place it in your folder.
for /f "eol=: delims=" %%F in (
'dir /b /a-d /oe-n *^|findstr /r "_[0-9][0-9]\.[^.]*$"'
) do (
if !next! neq !prev! (
) else (
move /y "%%F" old >nul
You can run the script from a command prompt, or you can simply double click on the script within Windows Explorer.
The script works as long as none of the names contain the
! character - this limitation can be removed with extra code.
If the script finds an outdated file in your folder that already exists in the old folder, then it will simply over-write the existing file in old.
Explanation of how it works
The script lists all files in the directory, sorted by extension, then by name descending. The list is then filtered by FINDSTR to preserve only base names that end with "_nn" where nn is a 2 digit number.
The resultant file list is processed by FOR /F, one at a time. For each file, the 2 digit name suffix is removed and the result compared against the previous file. If it is a new value, then the previous value is updated and the file is preserved. If the value matches the previous value, then the file is moved.