Sponsored Content
Full Discussion: Files resending through FTP
Top Forums Shell Programming and Scripting Files resending through FTP Post 302078250 by Bhups on Thursday 29th of June 2006 04:22:53 AM
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
 

9 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

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

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

7. 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

8. 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

9. 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
CURLOPT_FTP_FILEMETHOD(3)				     curl_easy_setopt options					 CURLOPT_FTP_FILEMETHOD(3)

NAME
CURLOPT_FTP_FILEMETHOD - select directory traversing method for FTP SYNOPSIS
#include <curl/curl.h> CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FTP_FILEMETHOD, long method); DESCRIPTION
Pass a long telling libcurl which method to use to reach a file on a FTP(S) server. This option exists because some server implementations aren't compliant to what the standards say should work. The argument should be one of the following alternatives: CURLFTPMETHOD_MULTICWD libcurl does a single CWD operation for each path part in the given URL. For deep hierarchies this means many commands. This is how RFC1738 says it should be done. This is the default but the slowest behavior. CURLFTPMETHOD_NOCWD libcurl does no CWD at all. libcurl will do SIZE, RETR, STOR etc and give a full path to the server for all these commands. This is the fastest behavior. CURLFTPMETHOD_SINGLECWD libcurl does one CWD with the full target directory and then operates on the file "normally" (like in the multicwd case). This is somewhat more standards compliant than 'nocwd' but without the full penalty of 'multicwd'. DEFAULT
CURLFTPMETHOD_MULTICWD PROTOCOLS
FTP EXAMPLE
TODO AVAILABILITY
Added in 7.15.1 RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not. SEE ALSO
CURLOPT_DIRLISTONLY(3), CURLOPT_FTP_SKIP_PASV_IP(3), libcurl 7.54.0 February 09, 2016 CURLOPT_FTP_FILEMETHOD(3)
All times are GMT -4. The time now is 03:19 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy