Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

BATCH - replace vowels

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??

Name: Anonymous 2009-05-17 8:35

>>9
my posted code seems pretty legit to me
That's what everyone thinks

(a e i o u ä ö ü)
I haven't programmed a .bat in years but have you tried ("a" "e" "i" "o" "u" "ä" "ö" "ü") instead

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List