1.

Solve : Kudos for DOS Forum?

Answer»

Quote

I tried it, and it produced the error message " 'typ' is not recognized as an internal or external command, operable program or batch file. ", but it still executed the command to completion!
Only incidentally.

Code: [Select]typ nul > somefile.txtSays to execute the command "typ nul" and redirect the standard output to "somefile.txt". since typ is not a command, the command fails, the message prints to the standard error stream, and then the standard output is redirected to the file, which in this case means nothing gets redirected, which incidentally is what the original command was intended to do. The only functional difference between:

Code: [Select]type nul > somefile.txt
and
Code: [Select]geeble gobble > somefile.txt

is that the latter will produce an error message in addition to redirecting nothing to the file.Thanks for the CLARIFICATION.  I see it now.  Two separate results of any (is it accurate to say any?) command.  It's like this:
Code: [Select]geebles gobble but they don't gob down > somefile.txt Quote from: stew2652 on November 19, 2014, 06:57:56 AM
Interesting.  I did not execute this PARTICULAR command in a batch.  I issued it directly at the command LINE, and it produced the error message I stated.

No matter where you issued the command, it still failed.

Quote
but it still executed the command to completion!

Just to clarify, this is the bit that it didn't do.



Discussion

No Comment Found