@ECHO OFF
SETLOCAL
SET "sourcedir=U:\sourcedir"
FOR /f "tokens=1,3delims=)-." %%a IN (
'dir /b /a-d "%sourcedir%\*) - *.kam" '
) DO FOR /f "tokens=*" %%u IN ("%%b") DO ECHO REN "%sourcedir%\%%a) -%%b.kam" "%%u - %%a).kam"
GOTO :EOF
This should solve your problem. You'd need to change yur sourcedir of course.
The required REN commands are merely ECHO
ed for testing purposes. After you've verified that the commands are correct, change ECHO REN
to REN
to actually rename the files.