Automatic FTP


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Automatic FTP
# 1  
Old 12-25-2009
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
# 2  
Old 12-26-2009
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?
# 3  
Old 12-26-2009
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.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

automatic FTP failed

I have automated ftp for different scripts. every script uses different login and passwords for different server. it reads the username and password from netrc. there is 1 particular script that is failing. this script is failing in FTP step. i have checked the logs it says login failed. but... (5 Replies)
Discussion started by: dazdseg
5 Replies

2. Shell Programming and Scripting

Automatic FTP-Download | not files older then x days

Hey Guys, i need to download files from a ftp-server that not older than $VAR (x) days eg for seven days ./script 7 or two weeks ./script 14 all files from the last 14 days will download but how i can explain "ftp" this? sorry for my strange english :/ (2 Replies)
Discussion started by: tetex
2 Replies

3. AIX

.netrc and Automatic ftp problem

Guy's We have two AIX servers Server1 and Server2 and we have created user1 in Server1 and Server2 ... and .netrc file was confiured under /home/user1 with the below line machine server2 login user1 password abc1234567 -rw------- 1 user1 staff 159 Sep 28 2004 .netrc ... (7 Replies)
Discussion started by: ITHelper
7 Replies

4. SCO

Automatic FTP script

We are using SCO OS 5.05 server and we are doing a manual ftp to another SCO OS 5.05 server to backup our database. We are using the Bourne shell. We would like to automate the ftp backup of our database instead of doing it manually. It would be nice to run a script. Also would there be anyway... (4 Replies)
Discussion started by: texastig
4 Replies

5. Shell Programming and Scripting

Automatic FTP Script from windows to unix machine

Hi i need to FTP files from windows to unix(sun) machine using script. what are the scripts commands i need to use to transfer files Thanks (2 Replies)
Discussion started by: bmkreddy
2 Replies

6. Shell Programming and Scripting

Is it possible..when ftp session disconnect and it can automatic run again?

Hi, Is is possible when ftp script disconnect by remote server and it can restart to tranfer (such as restart in 10 mins, etc)? Please help!!!! (1 Reply)
Discussion started by: happyv
1 Replies

7. Shell Programming and Scripting

Automatic ftp job

I'm slowly (very slowly) learning csh and the UNIX underpinnings of Mac OS X so please bear with me. I want to be able to ftp a file to my personal webspace at work. I can do this by manually going in and doing ftp host.domain.com user: password: cd /folder put myfile etc.. I'd like... (4 Replies)
Discussion started by: DumDum
4 Replies

8. UNIX for Advanced & Expert Users

Automatic boot up

Hi everyone, I was wondering if anyone out there knows how I can make my UNIX server (Using Solaris8) boot up to a prompt without needing me to login. I simply want to turn on my UNIX box and get to a prompt without needing to input login and password. Many thanks, Sid (1 Reply)
Discussion started by: snili
1 Replies

9. Shell Programming and Scripting

automatic su

Hi all, Suppose I have a script under user A, which calls a script under user B (this script should be run using user B). How can I change the user (along with supplying the password) automatically in the script (a command similar to su)? Thank you in advance Best Regards (1 Reply)
Discussion started by: omran
1 Replies

10. UNIX for Advanced & Expert Users

Automatic FTP

Hi, We have a requirement to transfer(FTP) files created in a particular directory (In Solaris) to NT machine. Also this process neeeds to be automated. I belive a command MAIL in UNIX could be used to find new files created in a directory, but this just sends the file list to the logged user.... (5 Replies)
Discussion started by: shyamrk
5 Replies
Login or Register to Ask a Question