>>>hello everybody,
>>>
>>>how could I hide the DOS Command Prompt that pops up when I run a DOS command in my VFP program?
>>>
>>>Thanks very much,
>>>Jimi
>>
>>Take a look at file #
9477. It allows to run command hidden.
>
>Seems it can only run a program hidden, but cant run DOS command such as "copy"
>or just i'm missing something? anyway, I tried to use xcopy.exe instead of copy, it seems good.
Actually, you can run COPY; you have to realize that it's a DOS internal comand, though, and as such, there is no COPY.EXE or COPY.COM to invoke. You either need to incorporate the COPY command into a batch file, so that the DOS CLI will process it rather than CreateProcess() attempting to launch it on its own, or explicitly invoke a new command processor for the copy command, as shown below:
COMMAND /C COPY MyFile.Foo YourFile.Bar
>
>But then i have another problem: since my task is to copy some files to a folder and zip them, i have to wait until all files are copied before zipping. I used LaunchAppAndWait() for this, however, the program does not aware that xcopy is finished even after all files are copied, until the user press "Esc". This problem only occurs when using xcopy, it can waits and works again in correct timing when i test with other program (e.g. pkzip)
>
>Any idea?
>
>Thanks a lot!
>Jimi