I am creating a batch script for which I have a script that is giving me a frustrating error. The location the batch file is being excecuted from is C:\Users####\Desktop\Sp2\Sp2.bat. I want the file to prompt the user if it wants to make a batch file. I got that down. I used the code
echo Would you like to create a directory to output the files to? set /p mkdir=[Y/N] if %mkdir%==Y ( goto :mkdir ) ELSE ( goto :numset ) This part works fine. Now here's where the problem arises:
:mkdir echo Enter a name for your folder. set /p foldername= MD %~d0\%foldername% goto :numset I this keeps giving me the error "The syntax of this command is incorrect."Can anyone give me a solution to this problem?