1.

Solve : Batch File crashes when using pipe (|)?

Answer»

Any time I try to use the pipe symbol (|) in a batch file (either using the echo command to display it or using it in a command line - "TYPE NUL | CHOICE.COM /N /CY /TY,5 >NUL" for example)

Any idea what is causing this and how to fix it?

THX!It would be helpful if you MENTIONED what error you're getting. CHOICE came with DOS 7 [Win 95/98], with the NT 4 resource kit, and is not available with Win2000 or XP.

Let us know. Wow, I have no idea. I'm running Windows2000 Professional here at work.

It doesn't really give an error message, it just immediately closes before you can see what error it TRIES to display. Is there some line I can add to get the window to stay OPEN long enough to see the error?If CHOICE is installed on your machine:

TYPE NUL | choice /c:delay /td,5>NUL

I found this in my archives. Apparently 'delay' is another one of MICROSOFT's undocumented features. I couldn't test this on a XP machine, so I wish you well.



Discussion

No Comment Found