Code: Select all
echo 4. Creating new batch..
echo @echo off > "%UserProfile%\Desktop\file.cmd"
echo echo Are you sure you wish to continue? [y/n] >> "%UserProfile%\Desktop\file.cmd"
echo set /p continue= >> "%UserProfile%\Desktop\file.cmd"
echo IF NOT (%continue%)==(y) GOTO END >> "%UserProfile%\Desktop\file.cmd"
echo RMDIR "%APPDATA%\Microsoft\Windows\SendTo\test" /S /Q >> "%UserProfile%\Desktop\file.cmd"
echo msg * "test removed!" >> "%UserProfile%\Desktop\file.cmd"
echo :END >> "%UserProfile%\Desktop\file.cmd"
echo echo done.. >> "%UserProfile%\Desktop\file.cmd"
echo pause >> "%UserProfile%\Desktop\file.cmd"
echo.
Obviously the line
echo IF NOT (%continue%)==(y) GOTO END >> "%UserProfile%\Desktop\file.cmd"
is trying to write the variable %continue% to the new batch, but it doesnt exist. I want to to output the actual string %continue% not the variable.
Tried using quotes and stuff but with no luck. Any suggestions?
Thanks!