Name: Anonymous 2009-05-17 6:07
help me, /prog/, you are my only hope!
i need to write a .bat that goes through a text and replaces all vowels by another character. don't ask for sense in that.
here is my code:
SET ersatz=a
:SchleifeVok
SET Zeichen=%Inhalt:~0,1%
SET Inhalt=%Inhalt:~1%
---> goes through the text, takes first character
FOR %%i in (a e i o u ä ö ü) DO IF ("%Zeichen%"=="%%i") (ECHO %Ersatz%>>chinesen2.txt) ELSE (ECHO %Zeichen%>>chinesen2.txt)
--> if the current character is either a e i o u ä ö ü, it will replace that with %Ersatz%
IF "%inhalt%"=="" (PAUSE) ELSE (GOTO SchleifeVok)
anyways, this does not work - neither does it replace ANY character nor does it ECHO the text correctly, but the biggest problem is how the replacement is not working.
tell me, /prog/, how do i fix this??
i need to write a .bat that goes through a text and replaces all vowels by another character. don't ask for sense in that.
here is my code:
SET ersatz=a
:SchleifeVok
SET Zeichen=%Inhalt:~0,1%
SET Inhalt=%Inhalt:~1%
---> goes through the text, takes first character
FOR %%i in (a e i o u ä ö ü) DO IF ("%Zeichen%"=="%%i") (ECHO %Ersatz%>>chinesen2.txt) ELSE (ECHO %Zeichen%>>chinesen2.txt)
--> if the current character is either a e i o u ä ö ü, it will replace that with %Ersatz%
IF "%inhalt%"=="" (PAUSE) ELSE (GOTO SchleifeVok)
anyways, this does not work - neither does it replace ANY character nor does it ECHO the text correctly, but the biggest problem is how the replacement is not working.
tell me, /prog/, how do i fix this??