for /f “delims=” %%a in (‘dir /b .‘) do (
call :find_dir %%~a
@if !ERRORLEVEL! == 0 (
set old_name=%%~a
set new_name=!old_name:~7,100!
@echo “!new_name!”
rename “!old_name!” “!new_name!”
) else (
@echo “%%~a”
)
)
exit /b
:find_dir variableName
@setlocal enableDelayedExpansion
@echo %1|>nul findstr /r “^1[26][0-9][0-9][0-9]” && set/a retV=0 || set/a retV=1
exit /b !retV!