by bru » Wed Feb 05, 2020 12:02 pm
Its hard to say without the full filenames. If you've simply removed extensions, you could try brc in a batch:
@echo off
cd "C:\YourFolderPath"
Setlocal EnableDelayedExpansion
For /f "delims=. tokens=1,2,3,4" %%A IN ('dir/b/a-d 20??.???.1.*') DO (
For /f "delims=0 tokens=1*" %%E IN ("%%B") DO (
(Set/a inc="%%E+3")&&(Set inc=00!inc!)
IF NOT "!inc:~-4,1!"=="0" (Set inc=!inc:~-4!) ELSE (Set inc=!inc:~-3!)
brc32 /NoDup /NoFolders /IgnoreFileX /Pattern:"%%A.%%B.%%C.%%D" /Regexp:"^(20|19)(\d\d)\.(\d{1,4})\.(1).(%%D)$:\1\2.!inc!.\4.\5" /Execute))
pause>nul
You can remove /Execute to preview the would-be renames, but the results are like:
2014.1.1 ---------> 2014.003.1
2008.008.1 ------> 2008.011.1
2012.999.1 ------> 2012.1002.1
2112.abc.1 ------> No effect
200a.003.1 ------> No effect