Batch File Not Making Folders

Microsoft Windows vista home basic - 32-...
September 19, 2010 at 08:53:57
Specs: Windows Vista, 2.80 GHz / 1024
Hello I have a batch file and i have it like this
echo Sign Up
echo ================
echo.
set /p %newuser%="Username : "
set /p %newpass%="Password : "
cd C:\
if exist OS goto md_cre
md OS
:md_cre
cd C:\OS
if exist %newuser% goto usr_al_cre
md %newuser%
cd C:\OS\%newuser%
echo >> %newpass%
echo.
echo User Created
echo.
pause
goto L_MENU

except it closes when it gets to the md part. Then i removed md and it said the syntax was incorrect ... ?!?!?

Please Help.
Also This Is The Whole thing ( NOT COMPLETED)
@echo off
:MENU
cls
echo Menu
echo ================
echo.
echo 1) Sign Up
echo 2) Sign In
echo 3) Exit
CHOICE /c:123 /n
IF ERRORLEVEL 1 goto sign_up
IF ERRORLEVEL 2 goto sign_in
IF ERRORLEVEL 3 goto exit
goto MENU
:sign_up
cls
echo Sign Up
echo ================
echo.
set /p %newuser%="Username : "
set /p %newpass%="Password : "
cd C:\
if exist OS goto md_cre
md OS
:md_cre
cd C:\OS
if exist %newuser% goto usr_al_cre
md %newuser%
cd C:\OS\%newuser%
echo >> %newpass%
echo.
echo User Created
echo.
pause
goto L_MENU
:usr_al_cre
echo.
echo Sorry , A User Has Already Choose That Username
echo.
pause
goto MENU
:L_MENU
cls
echo MENU
echo ================
echo.
echo 1) Programs
echo 2) File Explorer
echo 3) Games
echo 4) Tools
echo 5) Log Out
CHOICE /c:12345 /n
IF ERRORLEVEL 1 goto PROGRAMS
IF ERRORLEVEL 2 goto FILE_EXPLORER
IF ERRORLEVEL 3 goto GAMES
IF ERRORLEVEL 4 goto TOOLS
IF ERRORLEVEL 5 goto MENU
goto L_MENU
:PROGRAMS
cls
echo PROGRAMS
echo ================
echo.
echo 1) Text Editor
echo 2) Archiver
echo.
echo 3) Go Back
CHOICE /c:123 /n
IF ERRORLEVEL 1 GOTO TEXT_EDITOR
IF ERRORLEVEL 2 GOTO ARCHIVER
IF ERRORLEVEL 3 GOTO L_MENU
goto PROGRAMS
:TEXT_EDITOR
cls
echo What Do You Want The Txt File To Be Called
set /p %txtname%=
cls
:TXTSTART
echo To Exit Type EXIT
echo =====================================================
echo.
echo %TXTDATA%
set /p %TXTDATA%=
IF %TXTDATA%="EXIT" goto PROGRAMS
ECHO >> %TXTDATA% "%txtname%.txt"
goto TXTSTART
:ARCHIVER
cls
echo To Use Archiver Type The Location Of The CAB File And
echo Output location.
echo =====================================================
echo.
set /p %fileloc%=" Location : "
set /p %fileout%=" Output : "
if not exist %fileloc% goto invaild_ARC
if not exist %fileout% goto invaild_ARC
goto start_arc
:invaild_ARC_LOC
echo You Typed A invaild Location or output
:start_arc
cls
echo Please Wait . . .
extract /a .cab %fileloc% /l %fileout%
echo.
echo Files Extracted To %fileout%
pause
goto PROGRAMS
:File_Explorer
cls
echo To Use File Explorer Please Type The Folder Of Which
echo Is shown. Type md <FOLDERNAME> and replace <FLOLDERNAME>
echo With Whatever And Create That Folder. Type EXIT to exit
echo.
dir C:\%dirloc%
set /p %dirloc%=
If %dirloc%="EXIT" goto PROGRAMS
goto :File_explorer


See More: Batch File Not Making Folders

Report •


#1
September 19, 2010 at 16:35:14
Try changing this:

set /p %newuser%="Username : "
set /p %newpass%="Password : "

To this:

set /p newuser=Username: 
set /p %newpass%=Password: 

Can I put a question here?


Report •

#2
September 20, 2010 at 13:24:41
Thanks That Worked . . . But it seemed like i was a first programmer when i saw your solution . But i changed
set /p %newpass%="Password : "

To

set /p newpass="Password :"

Well When i finish and i perfect it i will give the code and you guys can edit it :D

As Time Goes On People Will Create Better And More Resource comsuming os's. Like Aero is an good example.

Use The Past Not the Future :D


Report •

#3
September 20, 2010 at 13:27:12
Ok so here's were i delete alot of crap
I got rid of the text editor and archiver . . .
But now i need help to make one. Not EDIT.

As Time Goes On People Will Create Better And More Resource comsuming os's. Like Aero is an good example.

Use The Past Not the Future :D


Report •

Related Solutions


Ask Question