@echo off&setlocal enabledelayedexpansion for /r %%a in (*.dll) do ( set fn=%%~nxa set fn=!fn:ECKL=! rename "%%a" "!fn!" ) pause