Microsoft KB Archive/60716

= Reading Data from the Communications Port to a File =

Article ID: 60716

Article Last Modified on 11/16/2006

-

APPLIES TO


 * Microsoft MS-DOS 3.1
 * Microsoft MS-DOS 3.2 Standard Edition
 * Microsoft MS-DOS 3.21 Standard Edition
 * Microsoft MS-DOS 3.3 Standard Edition
 * Microsoft MS-DOS 3.3a
 * Microsoft MS-DOS 4.0 Standard Edition
 * Microsoft MS-DOS 4.01 Standard Edition
 * Microsoft MS-DOS 5.0 Standard Edition

-



This article was previously published under Q60716



SUMMARY
Using Microsoft MS-DOS Packaged Product Versions 3.x, 4.x, and 5.0, you can capture data from a communications port to a file by using any of the following commands:   COPY COMn: /A COPY COMn: /A COPY COMn: An end-of-file (EOF) character (CTRL+Z or ASCII 26) is used to mark the end of the file. The file will have a terminating EOF character only if you use the /A switch of the COPY command.

If you use the /B switch for the COPY command, the message &quot;Cannot do binary reads from a device&quot; is displayed, and COPY terminates.

While the file is being transmitted, spurious characters may be captured before the start of the data stream, due to the asynchronous nature of the COPY command. It is your responsibility to ensure that the data is checked for usability.

Additional query words: 3.x 4.00 4.01 5.00

Keywords: KB60716

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.