Files resending through FTP


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Files resending through FTP
# 1  
Old 06-29-2006
Files resending through FTP

Hi All,
I have the following requirement:
I have two server . One is source and other receiver.
My requiremnt is that from Source server i have to check in a specified
path whether any file with *.BAD extension is therer in the receiver server or not . If it then i have to resend the files to the receiver server through FTP.
E.g
Source server Receiver
10.124.1.24 10.124.3.45

If any files is in the server 10.124.3.45 with *.BAD then transfer it from source.
so we can have many files with *.BAD and we have to resend them all.

Thanks
D S
# 2  
Old 06-29-2006
list and then again ftp!!!

i guess u cant check if *.BAD fiels exist and ftp teh same, together.

so u need to first try connecting to destination box and list all the *.BAD files (into an existing file in source box) from the destination directory, as below:

from source box:
========

ftp destination ip
user xxx
pswd ***
cd destination directory(where *.BAD files are kept)
ls -ltr sourcedir_filename.txt (this will list all the files in destination dir to an existing file in source box)
bye

now you have a file "sourcedir_filename.txt" in your source box which has names of all the files (including *.BAD files).

so now you have to check if any *.BAD file exist in the above file and if it does then ftp the same files back to destination box.

this might be a lengthy way of doing it but it will work fine Smilie
cya
# 3  
Old 06-29-2006
Hi Thanks,
I have already done this and i did the same way as u mentioned.
Thanks for ur response.

DS
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

How to see the status of all the ftp put & get files logs and curent ftp transfer status ?

How to see the status of all the ftp put & get files logs and curent ftp transfer status if any active ftp running in the background ? (2 Replies)
Discussion started by: i4ismail
2 Replies

2. AIX

.ftp files

how to run .ftp file in AIX... the code contains somefile.ftp----> $cat somefile.ftp open <ip> user <username> <pwd> put <source of filename > <destination of file> .... it is giving error. can anybody help plzh (2 Replies)
Discussion started by: Madhu Siddula
2 Replies

3. Shell Programming and Scripting

Need help creating a script to FTP files to a server and then delete the files that were transfered.

I am trying to FTP files to a Windows server through my Linux machine. I have setup the file transfer with no problems but am having problem deleting those files from the Linux box. My current non-working solution is below. Any ideas, anyone?? :wall: Please be gentle, I'm fairly new to this... (4 Replies)
Discussion started by: jmalfhs
4 Replies

4. Shell Programming and Scripting

Resending file in ftp

Hi All, I would like to know it there is a posibility to resend a file to remote server and overwrite the old file. Recently i ftped a 39kb file to remote server(it's an unix based one). when end usersopened the file they could see only half of the file and the file size is also observed to... (1 Reply)
Discussion started by: Raamc
1 Replies

5. Shell Programming and Scripting

getting only new files from FTP

iam using mget *.* too get all files in FTP iam checking the FTP Server every day for the new files(there are 100s every day) and iam doing *.* by doing so iam getting the old files also(it overwriting the old files) ...... how can i get only the new files...... from FTP (4 Replies)
Discussion started by: nani1984
4 Replies

6. Shell Programming and Scripting

FTP the files

Hi, Currenty I am transfering the files which are in list-test.txt. Below is the code for same - file_ftp () { while read inFile do #inFile=abc.arch.gz FILETYPE=$inFile ftp -in $GATEWAY1 <<! user $USERID1 $PASSWD1 lcd $PICKUPDIR cd $DROPDIR1 bin ... (1 Reply)
Discussion started by: ravigupta2u
1 Replies

7. Shell Programming and Scripting

FTP files

Hi, I have to transfer the files from one unix box to abnother. Below is the function i have written - file_ftp () { #for inFile in `cat /home/rgupta/list-test.txt` #do inFile=abc.arch.gz FILETYPE=$inFile ftp -in $GATEWAY1 <<! user $USERID1 $PASSWD1 ... (3 Replies)
Discussion started by: ravigupta2u
3 Replies

8. Filesystems, Disks and Memory

Not able to FTP the files to a FTP server

Hi , We are facing a weird problem in our project. we need to send some xml & audio files to a remote FTP server from a Linux box, we are doing this in Perl script using Net::FTP->. Issue here is.. when FTPed the files using Perl scripts, only empty files ( 0 byte) are getting created on the... (2 Replies)
Discussion started by: kishorepotta
2 Replies

9. Shell Programming and Scripting

Ftp too many files.

Hi folks, Small but interesting issue. I have 15 files in a directory with the same name as discribd below. refresh_20090407045220.dat refresh_20090407051445.dat refresh_20090407052138.dat refresh_20090407064528.dat refresh_20090407064654.dat refresh_20090407065012.dat... (9 Replies)
Discussion started by: Haque123
9 Replies
Login or Register to Ask a Question