[HPADM] RE: Automated FTP Script - File Checking

From: Roger Realsen (roger.realsen@wareforce.com)
Date: Wed Oct 30 2002 - 10:42:06 EST


Thanks to the many who replied with suggestions. There were many solutions
to the ultimate answers.

I ended up having our partner "write" the file with a ".tmp" extension and
then when the process is done writing, they rename the file to the one I am
looking for. Then from my side, my FTP script checks for the existence of
the finished filename. If it does not exist, then the script sleeps for
about 60 seconds and tries again.

Again, thanks to all - this list rocks!!

Roger

-----Original Message-----
From: Roger Realsen [mailto:roger.realsen@wareforce.com]
Sent: Monday, October 21, 2002 2:55 PM
To: Hewlett Packard (hpux-admin@dutchworks.nl)
Subject: [HPADM] Automated FTP Script - File Checking

Gurus

HP9000 D250
HPUX11.0

I have a few automated FTP scripts running and they all basically follow the
following syntax:

        ftp -i -n << EOF
        open <server>
        user <userID> <password>
        case
        binary
        get <filename1>
        close
        quit
        EOF

My problem lies in the fact that in cron I set these scripts to run at a
particular time and the company creating this file may not be done writing
at that time. What kind of steps can be taken to implement file checking to
insure I am getting a complete file (either from my side in a script or from
my partner company side)?

Any and all help is greatly appreciated.
Sincerely,

Roger Realsen
Director of IT
WF Acquisition Sub, Inc.
19 Morgan
Irvine, CA 92618
PH: (949) 472-9000
FX: (949) 452-1413
Email: roger.realsen@wareforce.com

--
             ---> Please post QUESTIONS and SUMMARIES only!! <---
        To subscribe/unsubscribe to this list, contact majordomo@dutchworks.nl
       Name: hpux-admin@dutchworks.nl     Owner: owner-hpux-admin@dutchworks.nl
 
 Archives:  ftp.dutchworks.nl:/pub/digests/hpux-admin       (FTP, browse only)
            http://www.dutchworks.nl/htbin/hpsysadmin   (Web, browse & search)


This archive was generated by hypermail 2.1.7 : Sat Apr 12 2008 - 11:02:21 EDT