I have a command prompt batch file with two menu options 1, that creates a txt file and adds text from a user input to it, and 2 that deletes said file.
I would like to expand option 1 if it's executed again that it adds text to the bottom of the file rather than overwriting it?
It works well but if the code is executed again it just writes over the file , I would like it to edit it and add the text to the bottom of the file.
Many Thanks
echo off
cls
set /p m= Enter 1 to add content to the text file, press 2 to delete the text file.
:MENU
if %m%==1 GOTO ADD
if %m%==2 GOTO DELETE
:ADD
set /p input- Enter the text you want to add to the file:
echo %input% >Test.txt
GOTO PAUSE
:DELETE
del Test.txt
echo File Deleted.
GOTO PAUSE
:PAUSE
pause