@ECHO OFF

for /d %%a in (*) do (
    if exist "%%~a\*.iso" ren "%%~a\*.iso" "%%~a.iso"
)

for /d %%b in (*) do (
    if exist "%%~b\*.bin" ren "%%~b\*.bin" "%%~b.bin"
)

for /d %%c in (*) do (
    if exist "%%~c\*.cue" ren "%%~c\*.cue" "%%~c.cue"
)

for /d %%d in (*) do (
    if exist "%%~d\*.pbp" ren "%%~d\*.pbp" "%%~d.pbp"
)

pause
