Re: DOS / XP bat file programming question




"Paul Randall" <paulr901@xxxxxxxxxxxx> wrote in message
news:eHEtz%23TzHHA.1208@xxxxxxxxxxxxxxxxxxxxxxx

"Pegasus (MVP)" <I.can@xxxxxxx> wrote in message
news:uEZJTtSzHHA.1188@xxxxxxxxxxxxxxxxxxxxxxx

"+Bob+" <uctraing@xxxxxxxxxxxx> wrote in message
news:7k89a35jgedhhc6dgm2khrauvh1c95r0ha@xxxxxxxxxx
It's been a long time since I've done this and my memory grows foggy

How do I feed a "y" response to a DOS command that wants to prompt me
for a Y/N answer?

How about if it prompts for two in a row?

Thanks,


As Ian suggested, piping Y into a command will do the trick,
e.g. like so:

echo F | xcopy c:\*.* d:\Test

Note that DOS is an operating system, same as Windows XP.
There is no DOS under Windows, only a Command Prompt.

In Help 7 Support, search for Command-line reference A-Z, to learn all
about "changes to the functionality of MS-DOS commands, new command-line
tools, command shell functionality, configuring the command prompt, and
automating commmand-line tasks". It may not be DOS, but Microsoft still
refers to the commands as MS-DOS commands, so it is not totally
unreasonable to refer to the window in which one uses the MS-DOS commands
as a DOS window.

The Cmd.exe window, displays something like this when you open it:
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

The Command.com window displays something like this when you open it:
Microsoft(R) Windows DOS
(C)Copyright Microsoft Corp 1990-2001.
I kinda think that this really is running a version of DOS under Windows,
but I could be wrong.

Both windows can run batch files, but the CMD window is much more
versatile. It has many more commands and more powerful batch capabilities
than the Command.com window.

WXP can format a disk creating an MS-DOS startup disk. I believe on
bootup it would actually be DOS and have capabilities similar to the
Command.com window.

-Paul Randall

I'm quite aware of Microsoft programmers sometimes getting
confused themselves about their own operating system. It's kind
of hard to understand . . . Nevertheless, the distinction must be
made because without it people get confused. On countless
occasions have I seen posts in this group that referred to fdisk.exe
or to sys.com, both of which are fundamental components of DOS
but have no place in Windows. Some posters complain about
format.com not working under "DOS", meaning that format.com
may not work in the Command Prompt under WinXP. Some
ask how to boot their WinXP machine into DOS, which they
obviously can't because WinXP (as opposed to Win9x) is not
built on DOS.

Perhaps Microsoft has finally purged all references to DOS
from Vista.

About the command processor: Why would Ian suggest to
the OP to use a legacy Win9x processor when, as you say,
the real thing is so much more powerful and has full 32-bit
capability?

While WinXP may be able to format a DOS boot diskette,
the capabilities of this boot disk would be extremely limited
to the point of being almost useless. If you need a good boot
disk then you should look at a Bart PE boot CD or one of
its derivatives.


.



Relevant Pages

  • Re: NTVDM hard error on Windows 2003 Server SP1
    ... Windows 2003 Server SP1 platform, there is a pop-up box with the error ... run regedit.exe from a DOS window command prompt. ... The server is not a domain controller, and is on a LAN with a Windows ...
    (microsoft.public.windows.server.general)
  • Re: Wildcard on Folder Name
    ... This is not DOS - it is the Command Prompt. ... Microsoft Windows XP - Command-line reference A-Z ... Microsoft Windows XP - MS-DOS subsystem commands ...
    (microsoft.public.windowsxp.general)
  • Re: "Read-only" Folders
    ... "Dos attrib command" - that's why. ... anti-Windows folks tell me that Windows is ...
    (microsoft.public.windowsxp.security_admin)
  • Re: hal.dll is corrupt or missing
    ... I didn't understand how you map the drive. ... When running Windows PE you have access to a command window (DOS like, ...
    (microsoft.public.windowsxp.embedded)
  • Re: Thanks Everyone
    ... All I was able to do was do simple dos commands, ... Windows hadn't loaded, I was hoping I was in the Command Prompt and that I ...
    (microsoft.public.windowsxp.general)