无检测重复规则必须一次完成
for /f "delims=" %%i in ('dir/ad/s/b *.*')do (
set "#=0"
for /f "delims=" %%j in ('dir/a-d/b "%%~fi\*.*"')do if /i not "%%~fi\%%~nxj"=="%~f0" (
call set/a "#+=1"
call set "$=000%%#%%"
for /f %%n in ('call echo,%%$:~-4%%')do (
(echo,"%%~fi\%%~nxj";"%%~nxi-%%n%%~xj")>>"%USERPROFILE%\Desktop\ren.log"
ren "%%~fi\%%~nxj" "%%~nxi-%%n%%~xj"
)
)
)