CODE: [Copy to clipboard]@echo off for %%a in (*.chm) do ( set "str=%%~na" call set "str=%%str:.= %%" call ren "%%a" "%%str%%.chm" )