Multiple choice

Which one of the following is an invalid command?

  1. DIR > LIST.TXT

  2. DIR >> LIST.TCT

  3. DIR >> LPT1:

  4. None of the above

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

In MS-DOS, redirection to ports like LPT1 uses > for output. The append operator >> works for files but not for printer ports - DIR >> LPT1 is invalid because you cannot append to a port, only overwrite with >. Options A (redirect to file) and B (append to file) are valid commands, so C is the invalid one.