home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Phoenix CD 2.0
/
Phoenix_CD.cdr
/
01e
/
let12.zip
/
DEMO-7.BAT
< prev
next >
Wrap
DOS Batch File
|
1987-09-17
|
1KB
|
34 lines
echo Off
If `%Name%' == `' Demo
cls
echo ╔════════════════════════════════════════════════════════════════╗
echo ┌─╫────────────────────────────────────────────────────────────────╫─┐
echo │ ║ String Manipulation (part 4): REPLACE ║ │
echo └─╫────────────────────────────────────────────────────────────────╫─┘
echo ╚════════════════════════════════════════════════════════════════╝
set Str=Dear (person): I think you should know that (something)
echo
echo Now, I have a string of my own, which looks like this:
echo
echo "%Str%"
echo
echo and what I want you to do is give me some information, for example,
:AskFor2
LET person=(proper (ask "What name should I fill in for (person)? "))
LET something=(ask "and what should I tell this person? --> you should know that ")
echo
echo Ok, you said (person) should be replaced by %person% and you want to say
echo %something%
echo
echo Here goes:
echo
LET STR=(replace Str "(person)" person "(something)" something)
echo We get:
echo %Str%
echo
set str=
set person=
set something=
pause
DEMO-8