piping into set /p

F

foxidrive

That'd be like using heavy machinery to sink a nail ;-) Plus, the only
thing guaranteed to exist (and be enabled) on every windows is,
unfortunately, cmd.

Not true. cmd itself can be disabled on machines. :)
 
T

Todd Vargo

Al said:
For one simple example, how often have you seen this kind of thing in a
batch script:

type y.txt | {some-command}

where "some-command" was a built-in command that requires the user to
confirm an action by entering "y" followed by a carriage-return? I see this
in installation scripts that include the y.txt file, but sometimes it is
created on the fly. It seems to me always better to do this:

echo/y | {some-command}

I don't see this very often at all. I am annoyed when I see the ECHO Y
version used where a command has it's own /y switch. ISTM when I see this
syntax these days, I assume these are by people who are learning/clipping
batch code from a DOS website instead of more appropriately related to their
OS.
 
A

Al Dunbar

Todd Vargo said:
I don't see this very often at all. I am annoyed when I see the ECHO Y
OUCH!

version used where a command has it's own /y switch.

Whew! that let's me off the hook! Of course, I would only use echo/y when
that was the only practical way...
ISTM when I see this
syntax these days, I assume these are by people who are learning/clipping
batch code from a DOS website instead of more appropriately related to
their
OS.

Not me, honest.

/Al
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top