Code: Select all
@echo off
cls
echo enter first word
set /p a=
echo enter second word
set /p b=
@echo off
@echo if %word% == %a% echo to %b% ----- %c%>> c.txt
@echo if %word% == %b% echo to %a% ----- %c%>> c.txt
goto top
unfortunately the environmental variables %word% and %c% don't get typed because they don't exist in this file how can I type them into the text file?
this is what gets written to the file
Code: Select all
if == hello echo to bye -----
if == bye echo to hello -----