PRB: "Lpt1 Already Exists, Overwrite It?" Copying File to LPTLast reviewed: June 27, 1995Article ID: Q107408 |
The information in this article applies to:
SYMPTOMSWhen you are using the COPY FILE command to copy a file to a printer port, the following message is generated when SAFETY is set ON:
<path name>lpt1 already exists, overwrite it? CAUSEWhen a command similar to the following is issued
COPY FILE test.txt TO lpt1FoxPro is actually copying the TEST.TXT file to a file called LPT1. However, MS-DOS interprets the request to open the file LPT1 as a request to send data to the printer port. Because FoxPro is copying to a file, the SET SAFETY command recognizes that the "file" LPT1 already exists (as an MS-DOS device), and verifies that the user wants to overwrite it.
RESOLUTIONTo prevent this message, issue code similar to the following to set SAFETY OFF before copying the file to the port, then set SAFETY ON again immediately:
SET SAFETY OFF COPY FILE <filename> TO <printer port name> SET SAFETY ONNOTE: This error might not occur when you are copying a file to a network printer port.
|
Additional reference words: FoxDos FoxWin 1.02 2.00 2.50 2.50a 2.50b lpt2
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |