Microsoft KB Archive/218976

= BUG: COPY FILE TO Command Behaves Differently Based on OS =

Article ID: 218976

Article Last Modified on 5/12/2003

-

APPLIES TO


 * Microsoft Visual FoxPro 3.0b Standard Edition
 * Microsoft Visual FoxPro 5.0 Standard Edition
 * Microsoft Visual FoxPro 5.0a
 * Microsoft Visual FoxPro 6.0 Professional Edition

-



This article was previously published under Q218976



SYMPTOMS
The COPY FILE TO command allows you to print to a device name under Windows NT. In Windows 95 or Windows 98, the command simply makes a file without an extension with the same name as the device.



STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.



Steps to Reproduce Behavior
 While running Visual FoxPro 3.0x, 5.0x, or 6.0 on a Windows NT 4.0 Server or Workstation machine, create a text file named Bob.txt with a few lines of text in it.  Create a program containing the following code and run it: x=GetPrinter ? x COPY FILE Bob.txt TO (x) SET PRINTER TO SET PRINTER TO                    When the Printer dialog box appears, choose a printer from the Name drop-down list and click OK. Run the same code on a Windows 95 or 98 machine with Visual FoxPro 3.0x, 5.0x, or 6.0. On the Windows NT machine, the file prints to the printer selected in the Printer dialog box. It resolves the name as a device.

On Windows 95 or Windows 98, the same commands copy the file Bob.txt to another file with the name of the printer chosen in the Printer dialog box. This new file has no extension. In addition, no printed output occurs.

