Best way to poll for existence of a file?
GCC Consulting
gccconsulting at comcast.net
Sun Mar 29 17:26:28 PDT 2009
> -----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
More information about the Filepro-list
mailing list