I encountered the following problem: I wanted to create a batch file able to create another batch file, here's the code:
Code: Select all
echo @ECHO OFF >> BulBot.bat
echo title BulBot >> BulBot.bat
echo color 70 >> BulBot.bat
echo :masterlabel >> BulBot.bat
echo set /P input= >> BulBot.bat
echo IF %input% EQU clear ( >> BulBot.bat
echo CLS >> BulBot.bat
echo ) >> BulBot.bat
echo IF %input% EQU readme ( >> BulBot.bat
echo start C:\BulBot\readme.txt >> BulBot.bat
echo ) >> BulBot.bat
echo goto masterlabel >> BulBot.bat
Code: Select all
@ECHO OFF
title BulBot
color 70
:masterlabel
set /P input=
IF EQU clear (
CLS
)
IF EQU readme (
start C:\BulBot\readme.txt
)
goto masterlabel