Visit Our UNIX and Linux User Community

Top Forums Shell Programming and Scripting Reading list of files into ftp script Post 302151841 by porter on Monday 17th of December 2007 03:02:26 PM
Old 12-17-2007
#FTP Information 

while read line
#Start FTP session 
ftp -v -n  <<EOF 
open $ftp_server 
user "$ftp_user" 
#change to the correct directory 
cd /<directory>/<directory> 
#change to binary transfer mode 
mget $line 

done <filename.txt

Test Your Knowledge in Computers #124
Difficulty: Easy
Generally speaking, Linux is only a Kernel, while Linux distributions are treated as an OS.
True or False?

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Pulling a list of files from FTP site in a shell script

Hi, I am writting a shell script which will pull a list files (mentioned in one file 1.txt) from external FTP site (for ex: The 1.txt is in my local unix directory. I have username and password to connect the external FTP site. Also before I pull the files, I need... (0 Replies)
Discussion started by: spatra
0 Replies

2. Shell Programming and Scripting

Getting a list of files on an ftp, via shell script...

G'day, I was wanting to write a shell script that checks an ftp server for the presence of new files, then get those files. In so much as the get, this is pretty straight forward, but I cannot work out how to get a list of files to check. Is it possible for a shell script to get the output of... (1 Reply)
Discussion started by: Elric of Grans
1 Replies

3. Shell Programming and Scripting

list files on a server ftp

Hello, I would want to list files of an server FTP with the path of the file... i try "ls -R" but ftp don't accept this command... Is it possible with curl command ??? Regards. (5 Replies)
Discussion started by: protocomm
5 Replies

4. Shell Programming and Scripting

Help needed to transfer list of files to FTP server, to different folders

Hello Unix Gurus, Help required from you. My requirement is something like this I want to create a concurrenct program in Oracle Applications using shell script to transfer files from Apps Server to destination FTP server. I have created custom program, where I will extract all the... (4 Replies)
Discussion started by: amazon
4 Replies

5. Shell Programming and Scripting

How to list files in FTP prompt pagewise in solaris?

Hi, I have a solaris system with only ftp access.Need to get the list of files page wise display.. Also would like to redirect output of "ls" command to a text file in same directory. Can anyone suggest me the sollution for this? Rakesh (2 Replies)
Discussion started by: rakesh_noronha
2 Replies

6. Shell Programming and Scripting

FTP script to login and list files to log file

Hi Guys I did a forum search for "ftp scripts" Looked at 8 pages and didnt see anything that would help. Most seem to be logging into a ftp server and transfering files. What I need to do is login to a FTP server. Goto a folder and list it so it showes newest files first. It would be nice to... (4 Replies)
Discussion started by: voorhees1979
4 Replies

7. Shell Programming and Scripting

List files ftp

I list files on server ftp, and i'm a french man then i have files with accents. When i use wget for a mirroring, the files with accent are not encoded correctly, i have some "%CC%81" instead "" for example... I have idea to cat the file list and pipe for tr awk or sed but unfotunately nothing... (2 Replies)
Discussion started by: protocomm
2 Replies

8. Shell Programming and Scripting

ftp script : list 4 lasts files

Hi, At work we have backups on a ftp. I want to view 4 last files saved (their names, dates, and weight). how can i achieve this goal using simplest way ? Thank's. (3 Replies)
Discussion started by: simon974
3 Replies

9. UNIX for Dummies Questions & Answers

Reading Table name from a list of files in a Directory

Hi , I have searched through the forum but not able to find out any help :( i have a directory having lot of files which contains sql statemtns eg : file 1 contains select from table_name1 where ..................... select from table_name2 where .......... select from ... (3 Replies)
Discussion started by: Trendz
3 Replies

10. Shell Programming and Scripting

FTP to list files

Hi Guys, Am writing a FTP script to download file from a remote server. There are 3 files in the target directory. eg. bfg234.2 vfg345.1 abc123.1 abc123.2 I need to get the file "abc123.2". The number could be increasing everytime.I need to get the latest file. can this be done ? (1 Reply)
Discussion started by: giri_luck
1 Replies
SIMPLEFTP(1)						    InterNetNews Documentation						      SIMPLEFTP(1)

simpleftp - Rudimentary FTP client SYNOPSIS
simpleftp url [...] DESCRIPTION
simpleftp is a Perl script that provides basic support for fetching files with FTP in a batch oriented fashion. It takes one or more FTP URLs on the command line. The file(s) will be retrieved from the remote server and placed in the current directory with the same basename as on the remote; e.g., <> is stored as active.gz in the current directory. The script properly understands usernames, passwords and ports specified as follows: ftp://user:password@host:port/path/file BUGS
simpleftp is an extremely poor substitute for more complete programs like the freely available wget or ncftp utilities. It was written only to provide elementary support in INN for non-interactive fetching of the files in <> or <> without requiring administrators to install yet another package. Its shortcomings as a general purpose program are too numerous to mention, but one that stands out is that downloaded files by simpleftp override existing files with the same name in the local directory. HISTORY
Tossed off by David C Lawrence <> for InterNetNews. Rewritten to use "Net::FTP" by Julien Elie. $Id: simpleftp.pod 8357 2009-02-27 17:56:00Z iulius $ SEE ALSO
actsync(8). INN 2.5.2 2009-05-21 SIMPLEFTP(1)

Featured Tech Videos

All times are GMT -4. The time now is 09:27 AM.
Unix & Linux Forums Content Copyright 1993-2020. All Rights Reserved.
Privacy Policy