lundi 7 novembre 2016

Batch crash on set command?

Here's my problem:

:NNEEWW
cls
echo Where to save the file (Type "Desktop" or "Docs")
set /p SaveTo="Where to save: "
if "%SaveTo%" == "Desktop" goto DT
if "%SaveTo%" == "desktop" goto DT 
if "%SaveTo%" == "Docs" goto DC
if "%SaveTo%" == "docs" goto DC
goto NNEEWW
:DT
set Place=DE
:DC
set Place=DO
cls
echo 'Name your file [You can not add the following: \ / : * ? " < > |]'
set /p name="Name: "
echo echo off>>"Current.BAT"
echo cls>>"Current.BAT"
title Editing: %name%.BAT - Program Creator
cls
echo Editing %name%.bat [Type "Quit" to save and quit, Type "Help" to get some help with commands]
echo [@echo off has already been added, to get rid of it, type "echo on", without an @ symbol please]
echo "Please do not add ['>', '|', '<'] as they are not yet supported"
echo.
:2
set /p content="[-]: "

now whenever somebody types "Docs" or "Desktop" the program just crashes! I think it has something to do with the set command but I'm not sure.

Aucun commentaire:

Enregistrer un commentaire