Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CopyFile API
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Title:
Miscellaneous
Thread ID:
00454724
Message ID:
00455692
Views:
34
Check out MS KB article Q252607. It reports this exact problem with respect to the CopyFile method of the FileSystemObject. Since this is a wrapper to the underlying WinAPI fucntions. it stands to reason that the problem exists there.

MS recommends you rename the printer as you did.

>>Try:
>>
>>IF CopyFile('c:\temp\test.txt',['\\servername\printer name'],0) # 0
>>
>>This will pass everything inside the [] to the CopyFile function. Maybe it will work (can't test it from my current location).
>
>Larry,
>
>This doesn't seem to be working, I will test some more. The other problem I am going to have is that I want to get the printer name at the client location using the APRINTERS() function. If this function returns a shared printer name with a space, how would you handle passing of a variable?
>
>= APRINTERS(laPrinters)
>IF CopyFile(lcTextFile, laPrinters[1,1], 0) # 0
>
>Thanks again for your continued help.
>
>Kind Regards,
>
>Mat
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform