Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Running an external program from Visual Foxpro program
Message
From
16/06/1998 09:50:10
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
15/06/1998 09:13:36
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00107729
Message ID:
00108635
Views:
47
>Erik,
> thanks for your reply. Basically, this external program is EXPEDITE for Windows by IBM. We use it to transfer and receive files from the IBM Advantis system. This software creates a log for which my program can wait, but this cannot work because the EXPEDITE sw creates the file rightaway as soon as it is the sw is executes and we don't want to open the file till the entire transfer is done or else we will have file open errors.

It can wait. The trick is that if any program creates a file, its size is reported as zero as long as the program keeps the file open. So, in your fox routine, you launch Expedite, and create a loop like this:

do while .t.
n=adir(aFiles, "the_log.txt")
if n=0
* something wrong, can't find the file - exit or do something else
else
if aFiles[1,2]=0 && the length of file - see ADir function
* it's still working
wait "Processing... " time 5
else
wait clear
exit
endif
endif
enddo

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform