If exist cassandra.htm del cassandra.htm echo Bitte suchwort eingeben^: set /p Suche= dir /b /s *.txt >>textsuch.log dir /b /s *.htm >>textsuch.log dir /b /s *.html >>textsuch.log FOR /F "tokens=*" %%A IN ('findstr /N .* "textsuch.log"') DO echo %%A>>zahlsuch.log for /f "delims=: tokens=1,2,3*" %%i IN (zahlsuch.log) DO findstr /r /s /i /c:"%Suche%" %%j:%%k >>erg_%%i.log set destination=%~dp0% >"%destination%cassandra.html" ECHO ^ >>"%destination%cassandra.html" ECHO ^ >>"%destination%cassandra.html" ECHO ^ >>"%destination%cassandra.html" ECHO ^Ergebnis >>"%destination%cassandra.html" ECHO ^