@echo off
CLS
setlocal
FOR %%i in (*.iwd) do call :loop "%%i"
goto Reicht
:loop
REM #### jede iwd in $iwds
set iwds=%1   
REM #### Localized hat 10 Stellen
set prefix=%iwds:~1,+10%
set prefix=%prefix:~0,-1%
REM #### iw_ hat 4 Stellen
set iw=%iwds:~1,+4%
set iw=%iw:~0,-1%
REM #### localized oder iw_ sind irgendwie wichtig :)
if "%prefix%"=="localized" goto Bleibt
if "%iw%"=="iw_" goto Bleibt
REM ##### Alle anderen iwds koennen weg. Normalerweise. Eigentlich. Lieber Umbenennen.
@echo Umbennannt: %iwds%
REM ##### Die "" Vorn und hinten weg
set neu=%iwds:~1,-8%
ren %iwds% "%neu%.old"
goto :eof
:Bleibt
REM #### @echo Bleibt %iwds%
goto :eof
:Reicht
Endlocal