Specialty Forums
Security and Virus
General Hardware
CPUs/Overclocking
Networking
Digital Photo/Video
Office Software
PC Gaming
Console Gaming
Programming
Database
Web Development
Digital Home

General Forums
Windows XP
Windows Vista
Windows 95/98
Windows Me
Windows NT
Windows 2000
Win Server 2008
Win Server 2003
Windows 3.1
Linux
PDAs
BeOS
Novell Netware
OpenVMS
Solaris
Disk Op. System
Unix
Mac
OS/2

Drivers
Driver Scan
Driver Forum

Software
Automatic Updates

BIOS Updates

My Computing.Net

Solution Center

Free IT eBook

Howtos

Site Search

Message Find

RSS Feeds

Install Guides

Data Recovery

About

Home
Reply to Message Icon Go to Main Page Icon

Option to SKIP Set INPUT= prompt?

Original Message
Name: kev100
Date: March 27, 2006 at 19:39:09 Pacific
Subject: Option to SKIP Set INPUT= prompt?
OS: XP PRO
CPU/Ram: PENT/512
Model/Manufacturer: DELL
Comment:
Folks....

I'm using the Good 'ol...

set INPUT=
set /p INPUT= Enter First Name:

to get some user data.

However...I would like to give the option to SKIP entering any data without having to enter a blank (because the blank input would then overright the previous info).

Something like...
set INPUT=
set /p INPUT= Enter First Name or "S" to skip:

I'm hoping this is pretty basic....any help appreciated.

THANKS


> PLEASE CONTRIBUTE to Computing.net - Report back what did/didn't work for Others' Reference.<


Report Offensive Message For Removal


Response Number 1
Name: Mechanix2Go
Date: March 27, 2006 at 20:22:38 Pacific
Subject: Option to SKIP Set INPUT= prompt?
Reply: (edit)
choice /n do you have input for me?

goto :%errorlevel%

:1
set INPUT=
set /p INPUT= Enter First Name:
goto :eof

:2


=====================================
If at first you don't succeed, you're about average.

M2Go



Report Offensive Follow Up For Removal

Response Number 2
Name: kev100
Date: March 28, 2006 at 09:25:32 Pacific
Subject: Option to SKIP Set INPUT= prompt?
Reply: (edit)
In XP PRO...cmd window....I got the error:

'choice' is not recognized as an internal or external command,operable program or batch file.

Does this mean that the choice command is not part of XP's "simulated" DOS?

Thanks

> PLEASE CONTRIBUTE to Computing.net - Report back what did/didn't work for Others' Reference.<


Report Offensive Follow Up For Removal

Response Number 3
Name: franki
Date: March 28, 2006 at 09:58:26 Pacific
Subject: Option to SKIP Set INPUT= prompt?
Reply: (edit)
CHOICE is for MS-DOS/W9x

http://www.computerhope.com/choicehl.htm

The posting warnings clearly state that this is not the forum for XP, it is up the page.

XP is based on NT4 and NOT MS-DOS.

CMD.EXE = NT COMMAND PROMPT
COMMAND.COM = Emulated MS-DOS Command Prompt (loosely based on MS-DOS 5/6)

http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/ntcmds.mspx?mfr=true

http://www.ss64.com/nt/

http://www.ss64.com/ntsyntax/index.html


Report Offensive Follow Up For Removal

Response Number 4
Name: Mechanix2Go
Date: March 28, 2006 at 22:21:57 Pacific
Subject: Option to SKIP Set INPUT= prompt?
Reply: (edit)
Hi kev,

CHOICE is an externaql command. It's included in some versions of XP but not all. Dunno why.

I use CHOICE.COM from DOS and it seems to work OK. You can get it here:

CHOICE



If at first you don't succeed, you're about average.

M2


Report Offensive Follow Up For Removal




Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: Option to SKIP Set INPUT= prompt?

Comments:

 
  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 


Data Recovery Software




1GB Network Adapter

Environment Variable to a text file

Restoring Problem

3 Pin Case Fan Connector???

HP/Compaq 6710b


The information on Computing.Net is the opinions of its users. Such opinions may not be accurate and they are to be used at your own risk. Computing.Net cannot verify the validity of the statements made on this site. Computing.Net and Computing.Net, LLC hereby disclaim all responsibility and liability for the content of Computing.Net and its accuracy.
PLEASE READ THE FULL DISCLAIMER AND LEGAL TERMS BY CLICKING HERE

All content ©1996-2007 Computing.Net, LLC