Take User Input in PCDOS

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
phillid
Posts: 109
Joined: 03 Apr 2010 20:27
Location: Wellington, New Zealand
Contact:

Take User Input in PCDOS

#1 Post by phillid » 09 Dec 2010 16:48

Hello. A bit different from Windows Batch Programming, but still fits in. I have a computer that boots PCDOS 7.1 (yes, it still goes). The batch language in it is pretty much the same as MSDOS but I can't use the 'set /p' command to ask for input from the user.

I have a program that needs to request certain things from the user - ones that cannot be put into command line arguments etc, but as I have said, I cannot use set /p. I do know about the messy methods like this for example:

coffee.bat

Code: Select all

@echo off
echo Do you want a coffee?
prompt $G


yes.bat

Code: Select all

@echo off
echo Sorry, I can't get you one!


no.bat

Code: Select all

echo Good. Because I can't get you one anyway.


This is too messy and slow switching between different programs.


Is there a way to do this, or should I write a QBASIC program or something??

Thanks a million!

phillid

orange_batch
Expert
Posts: 442
Joined: 01 Aug 2010 17:13
Location: Canadian Pacific
Contact:

Re: Take User Input in PCDOS

#2 Post by orange_batch » 10 Dec 2010 05:11

I'm unfamiliar with PCDOS. Is there a choice command? Is there a command reference? Or does a command simply not exist, so user input is done via workarounds?

phillid
Posts: 109
Joined: 03 Apr 2010 20:27
Location: Wellington, New Zealand
Contact:

Re: Take User Input in PCDOS

#3 Post by phillid » 10 Dec 2010 18:31

Yeah, there's no choice command, or a help command! I was shocked by this. I will have to look at a simple QBASIC program to solve this.
Thanks anyway!

rfpd
Posts: 78
Joined: 06 Jul 2009 16:19
Location: Lisbon, Portugal
Contact:

Re: Take User Input in PCDOS

#4 Post by rfpd » 25 Dec 2010 16:28

type help on the command prompt for get more info.

Post Reply