*BSD News Article 54350


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!newsroom.utas.edu.au!munnari.OZ.AU!news.hawaii.edu!ames!lll-winken.llnl.gov!uwm.edu!chi-news.cic.net!news.uiowa.edu!haferman
From: haferman@icaen.uiowa.edu (Jeff Haferman)
Newsgroups: comp.unix.bsd.bsdi.misc,comp.unix.admin,comp.unix.misc,comp.unix.programmer
Subject: Re: Batching FTP File Transfer
Date: 11 Nov 1995 15:23:51 GMT
Organization: University of Iowa, Iowa City, IA, USA
Lines: 79
Distribution: world
Message-ID: <482f67$lpm@flood.weeg.uiowa.edu>
References: <480q9h$ojo@spectator.cris.com>
NNTP-Posting-Host: l-ecn036.icaen.uiowa.edu
Originator: haferman@l-ecn036.icaen.uiowa.edu
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.bsdi.misc:1410 comp.unix.admin:34688 comp.unix.misc:19337 comp.unix.programmer:30459


A sys-admin installed something called "aftp" on our system, which is a
PERL script that enhances the standard ftp.  It allows you to ftp an
entire directory to your local system via ftp (for example).  I have the
listing out of the magazine that it was printed in (Unix World); it
says that it was written by a Rebecca Thomas (beccat@uworld.com).

The article also mentions other public domain "enhanced" ftps...
ncftp (which I use all the time) is available from
ftp://cse.inl.edu/pub/mgleason/ncftp, and mirror, which allows
ftp'ing of directory hierarchys, available at
ftp://ftc.doc.ic.ac.uk/computing/archiving/mirror.


In article <480q9h$ojo@spectator.cris.com>, Mark Hunnibell <hunnibel@cris.com> writes:
> Tom Hill <TomHill@EasyInternet.ca> wrote:
>>I would like to be able to write a shell script that would perform FTP 
>>file transfers on batches of files, from a BSDI server to a Mac running 
>>an FTPD host.
>>Is it possible to do batched file transfers with the unix FTP client? Can 
>>these be automated the the FTP macdef feature?
>>I would appreciate hearing from anyone who has done this.
> 
> I have a script that runs by crontab entry to get a series of files via 
> FTP. You have to be a little careful with what happens next, because the 
> FTP connection may fail.  Nonetheless, here's how to do what you want.  
> 
> Assuming that your userid on the remote host (xxx.yyy.zzz) is userx and 
> the password for the account is yuser, you can create a file with this 
> kind of thing:
> 
> open xxx.yyy.zzz
> user userx yuser
> cd /pub/applications
> get filename.1
> get filename.2
> quit
> 
> Save the file as "ftp.script." Then, when you are ready to run this 
> beastie, do so with this kind of command:
> 
> ftp -in < ftp.script > ftp.output
> 
> If you are just getting files, then you probably do not need to redirect 
> the output to "ftp.output", but if one of the commands is to get a 
> directory listing, then you will probably want it stored in a file.
> 
> The application that I use this for is rather complex and requires two 
> actual FTP sessions, one to get the directory listings and then the 
> program analyzes them for new files and creates a custom script to start 
> another FTP session and fetch just the new files.
> 
> I hope that helps.
> 
> Mark Hunnibell
> markh@connix.com
> 
> ps... if you hear of a better way, please let me know, I might be 
> interested in making some changes.
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
-- 
==============================================================================
+            Jeff Haferman                         PH: (319) 335-5384        +
+ Department of Mechanical Engineering             FX: (319) 335-5669        +
+  and Center for Global and Regional            The University of Iowa      +
+        Environmental Research                   Iowa City, IA  52242       +
==============================================================================
+ http://www.cgrer.uiowa.edu/people/haferman e-mail:haferman@icaen.uiowa.edu +
==============================================================================