Search found 5 matches

by sebb
08 Jun 2012 05:16
Forum: DOS Batch Forum
Topic: Double variable prompt
Replies: 1
Views: 1791

Double variable prompt

Is it possible to make two variable prompts appear and be accessible at the same time?

Like this:


Enter your name: _
Enter your last name: _



You can click on either one to write in it!
by sebb
08 Jun 2012 05:05
Forum: DOS Batch Forum
Topic: Check if program or section exists
Replies: 1
Views: 1899

Check if program or section exists

Hello I am fairly new to bach and I was wondering how I could make some code that checks if what you entered in a variable exists before trying it. So I made some code like this: set /p "command=C:\>" if "%command%"=="%command:start=%" ( goto CONTAINCHECK2 ) ELSE ( goto...
by sebb
21 Apr 2012 05:05
Forum: DOS Batch Forum
Topic: save login
Replies: 1
Views: 2099

save login

I have this code: @echo off if not exist vars.bat ( type nul>vars.bat ) :menu cls echo 1) Make new variable echo 2) View a variable echo. set /p cin=Select option: if %cin%==1 goto mkvar if %cin%==2 goto getvar goto menu :mkvar cls set /p var=Enter variable name: set /p val=Enter value: echo set %va...
by sebb
20 Apr 2012 17:27
Forum: DOS Batch Forum
Topic: Variable space
Replies: 2
Views: 2642

Re: Variable space

Thanks! XD
by sebb
20 Apr 2012 17:19
Forum: DOS Batch Forum
Topic: Variable space
Replies: 2
Views: 2642

Variable space

I am making this batch file like this: :COMMANDPRO set /p "command=C:\> " if %command%==net user shutdown goto SHUTDOWN echo Command not recognised... goto COMMANDPRO It doesn't work because I can't have any spaces in the IF statement. For it to work, I would have to type in netussershutdo...