Microsoft KB Archive/64894

MS-DOS: Redirection Not Possible in IF Statement PSS ID Number: Q64894 Article last modified on 07-14-1993 PSS database name: O_MSDOS

4.00 4.01

MS-DOS

Summary:

Redirection fails if you attempt it in the “command” portion of an IF statement in Microsoft MS-DOS Packaged Product versions 4.00 and 4.01.

More Information:

If you attempt redirection on an IF statement line, either at the command line or in a batch file, the following message is displayed:

Out of input reading device Abort, Fail?

Example
The following line in a batch file or at the command prompt produces the above error message and zeros out the TEST.SRT file.

if exist test.txt sort < test.txt > test.srt

Microsoft has confirmed this to be a problem with the Microsoft MS-DOS Packaged Product versions 4.00 and 4.01. This problem does not occur in later versions of MS-DOS.

Additional reference words: 4.00 4.01 noupd

Copyright Microsoft Corporation 1993.