Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How would you set up API_AppRun to copy a few files?
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00210755
Message ID:
00210788
Views:
29
>I am presently building a wizard that will have to process an ASCII file.
>
>This file should be made off an unknown number of smaller ASCII files.
>
>So I thought it was a good opportunity to give API_AppRun a ride.
>
>lcCommandLine = "COPY.EXE *.* CODA.TXT"
>loDosProc = CREATEOBJECT( "API_AppRun",lcCommandLine, , "HID" )
>loDosProc.LaunchAppAndWait()
>
>etc...
>
>I can make Ed Rauh examples work (the ones with NotePad), but not this one. What am I doing wrong?
>

COPY is an internal command - there is no COPY.EXE to run. Try it using XCOPY instead.

An even better choice would be to use the Windows Scripting Host's Scipting.FileSystemObject (assuming you're willing to make sure it's installed on the target system), or the Win32 API CopyFile() command (I posted an example of using it to copy a file to the PRN device in the past day or so.)

>José
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