PC Review


Reply
Thread Tools Rate Thread

Batch File Programming Commands - Inkey?

 
 
=?Utf-8?B?VG9kZE1hbGNvbG0=?=
Guest
Posts: n/a
 
      2nd Mar 2007
I am trying to write a batch file for use in WindowsXP Home Edition. The file
will run from the Command Prompt and contains the xcopy command. I want to
include in the file the line
echo Do you want to continue? Y/N
Which command recognises and responds to the Y or N keypress?
I am told the INKEY command is not valid.
Many thanks for any help.
--
ToddMalcolm
 
Reply With Quote
 
 
 
 
Poprivet
Guest
Posts: n/a
 
      2nd Mar 2007
ToddMalcolm wrote:
> I am trying to write a batch file for use in WindowsXP Home Edition.
> The file will run from the Command Prompt and contains the xcopy
> command. I want to include in the file the line
> echo Do you want to continue? Y/N
> Which command recognises and responds to the Y or N keypress?
> I am told the INKEY command is not valid.
> Many thanks for any help.


See the SET command, and if you have it or want to download it, the old
CHOICE is probably the best, IMO anyway.

Pop`


 
Reply With Quote
 
Ayush
Guest
Posts: n/a
 
      2nd Mar 2007
ToddMalcolm wrote ::
> I am trying to write a batch file for use in WindowsXP Home Edition. The file
> will run from the Command Prompt and contains the xcopy command. I want to
> include in the file the line
> echo Do you want to continue? Y/N
> Which command recognises and responds to the Y or N keypress?
> I am told the INKEY command is not valid.
> Many thanks for any help.


set /p Var=Do you want to continue ? Y/N :

echo %Var%

Good Luck, Ayush.
--
XP-Tips [Set up XP so that only authorized people can use it] :
http://www.microsoft.com/windowsxp/u.../soleuser.mspx
 
Reply With Quote
 
=?Utf-8?B?VG9kZE1hbGNvbG0=?=
Guest
Posts: n/a
 
      2nd Mar 2007
Thank you Pop.
How do I get to use the CHOICE command?
My program says it is an invalid command.
What is IMO?
Many thanks for the help
--
ToddMalcolm


"Poprivet" wrote:

> ToddMalcolm wrote:
> > I am trying to write a batch file for use in WindowsXP Home Edition.
> > The file will run from the Command Prompt and contains the xcopy
> > command. I want to include in the file the line
> > echo Do you want to continue? Y/N
> > Which command recognises and responds to the Y or N keypress?
> > I am told the INKEY command is not valid.
> > Many thanks for any help.

>
> See the SET command, and if you have it or want to download it, the old
> CHOICE is probably the best, IMO anyway.
>
> Pop`
>
>
>

 
Reply With Quote
 
Pegasus \(MVP\)
Guest
Posts: n/a
 
      3rd Mar 2007
IMO=In My Opinion.

You should stick to the inbuilt WinXP commands instead of
"borrowing" an Win9x command such as choice.exe. The
command that Ayush gave you will work perfectly well.


"ToddMalcolm" <(E-Mail Removed)> wrote in message
news:2BEE26E4-D48F-4BBD-BE67-(E-Mail Removed)...
> Thank you Pop.
> How do I get to use the CHOICE command?
> My program says it is an invalid command.
> What is IMO?
> Many thanks for the help
> --
> ToddMalcolm
>
>
> "Poprivet" wrote:
>
> > ToddMalcolm wrote:
> > > I am trying to write a batch file for use in WindowsXP Home Edition.
> > > The file will run from the Command Prompt and contains the xcopy
> > > command. I want to include in the file the line
> > > echo Do you want to continue? Y/N
> > > Which command recognises and responds to the Y or N keypress?
> > > I am told the INKEY command is not valid.
> > > Many thanks for any help.

> >
> > See the SET command, and if you have it or want to download it, the old
> > CHOICE is probably the best, IMO anyway.
> >
> > Pop`
> >
> >
> >



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Programming commands CP Microsoft Excel Misc 2 15th Oct 2008 11:41 AM
Multiple commands in batch file loop mrgou Windows Vista General Discussion 6 13th Mar 2008 09:55 PM
execute batch file containing dos commands using asp.net application....... DB Microsoft ASP .NET 2 22nd Jun 2005 10:28 AM
FTP commands from batch file Michael Lawson Microsoft Windows 2000 1 13th Aug 2004 01:31 AM
MS dos commands for batch file use george Windows XP General 3 21st May 2004 08:56 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:18 PM.