Automatic FTP

Hi
I am looking for automatic FTP script from UNIX to UNIX servers. I have two problems that anyone may help:
1- The directory where the files have to be FTPed is varied, where it is identified by the date of today (YYYYMMDD)
2- the files come every 15 minutes and named by the time with form �switch_OPM_HH24mm�, i.e �switch_OPM_0200� or 0215 or 0230 or 0245 and so for the next hour. Not all the files have to be FTPed but the last file comes.

Finally the file that FTPed have to be loaded on Oracle DB installed on the destination server. File format is CSV

Appreciate your help.

Akhdour

This is a somewhat vague request, IMO. First off, you cannot initiate any kind of remote program using ftp. It requires a resident script on the remote node, or some kind of ssh/rsh command, not ftp.

What code have you written so far?

Write a cron job for the receiving side, that will run every 15 minutes that both updates the database, and decides which files will be processed.
You can send files whenever they become available.
The only caveat is that at some point there will be collisions, that is, a file will be processed by the receiving system before it is completely transmitted.
To resolve this problem, send two files, the data file first, and a small job file second. Process only files for which a job file exists.
Sounds easy, the last time I did it, it took the better part of a day.