Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DOS Copy Command/VFP 6.0
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00244498
Message ID:
00245447
Views:
25
>>Take a look at my FAQ entry on using the CopyFile() API call rather than the DOS COPY command or VFP COPY FILE command. You can also look at using my API_APPRUN class and XCOPY (COPY is an internal command, so running it without a command processor is troublesome) to run DOS commands without a DOS window. You can download API_APPRUN from here on UT.
>
>
>EXCELLENT! Thanks, Ed. Your FAQ was exactly what I was looking for. The API is working great with one exception: the return fails on one particular large file even though that file (a font file) is successfully uploaded. I'll play with GetLastError to see if I can ascertain why. Any ideas? While I've got your attention: Do you have a similar API for setting a printer in Win9x and NTWS? Anything better than Fox's SET PRINTER TO? I'm not wild about the syntactical differences between NT and Win9x
>

Without knowing what error is occurring, it'd be tough to guess. I normally use an installer (InstallShield Pro) to put font files in place; you may be running into problems related to the file attributes of the directory you're copying the font file into, especially if it's the Windows font folder, which has some unusual attributes.

Within VFP, unfortunately, no. You can manipulate the registry entry for the default Windows printer for the current user, but it is not the same thing as SET PRINTER TO, and the registry keys differ under NT and Win9x. You might consider writing a wrapper class to hide the syntactic differences; you can determine the current operating system in any of several ways, including the native OS(1) function.

>Thanks
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform