Best way to poll for existence of a file?
Boaz Bezborodko
boaz at mirrotek.com
Mon Mar 30 06:17:15 PDT 2009
GCC Consulting wrote:
>
>> -----Original Message-----
>> From: filepro-list-bounces+gccconsulting=comcast.net at lists.celestial.com
>>
>>
> [mailto:filepro-list-bounces+gccconsulting=comcast.net at lists.celestial.com]
> On
>
>> Behalf Of Boaz Bezborodko
>> Sent: Thursday, March 26, 2009 5:07 PM
>> To: filepro-list at lists.celestial.com
>> Subject: Best way to poll for existence of a file?
>>
>> I am updating a shipping system to integrate with UPS's Worldship. I
>> was going to use their "Hands-Off" shipping method that polls for the
>> existence of a data file in a specific directory and imports the data if
>> something exists. It can then generate a file with shipping data like
>> tracking number and freight charges to a specific file. I want to poll
>> for that file with FPro and import the data when it exists. I am using
>> Windows FP 5.6 off a Samba server.
>>
>> I was thinking of just setting up one rclerk or rreport operation to
>> just sit there and check for the existence of the file every couple of
>> seconds or minutes (using SLEEP) and import the data when something
>> exists. It just seems a little cludgy to me. Does anyone know of any
>> more elegant solution to doing this?
>>
>>
>> BTW, best of luck to all of those attending the meeting.
>>
>> Boaz
>>
>
> Short of using ODBC, What I have done in the past is have as part of the end
> of day operation of Worldship, output a csv file with the information I
> needed. Since you are running in *nix (my app is Windows), you would start
> a cron job to read in this file and processes the information any way you
> need to. Once the data has been processed, my program moves this file to an
> archive directory.
>
>
> Richard Kreiss
> GCC Consulting
> rkreiss at gccconsulting.net
>
>
The thing is that even though the file-server is running on Linux I am
running FP as a Windows operation so CRON won't work as I can't execute
the task as a Linux process. I guess my only choice is to have a
FilePro task running in the background constantly checking for a file.
Boaz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.celestial.com/pipermail/filepro-list/attachments/20090330/9f5e6ee5/attachment.html
More information about the Filepro-list
mailing list