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:
00210883
Views:
28
>>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é

OK,

A quick followup here: CopyFile() will copy only one file to another. That's what my testing shows. I've read MS comments on my MSDN library, and as I understand it will copy one file.

So I'm left with xCopy which is just fine for the small thing I'm building up right now.

José
Previous
Reply
Map
View

Click here to load this message in the networking platform