OT: ftp enhancement utility??

John Esak john at valar.com
Thu Jul 1 17:14:52 PDT 2010


Bill,
Thanks so much for your explicit reply. This is just what I was looking for.
The guy needing this is going to an outside server so I don't think the
rsync will work in this case... Well, heck they may do that.. .but he can
definitely use the wget or ncftp.  My mind is getting very old to have
forgotten thsese things.

Thanks,

John

Cc: Dale 

> -----Original Message-----
> From: filepro-list-bounces+john=valar.com at lists.celestial.com 
> [mailto:filepro-list-bounces+john=valar.com at lists.celestial.co
m] On Behalf Of Bill Campbell
> Sent: Thursday, July 01, 2010 7:54 PM
> To: filepro-list at lists.celestial.com
> Subject: Re: OT: ftp enhancement utility??
> 
> On Thu, Jul 01, 2010, John Esak wrote:
> >ON SCO O/S 5.6  I used to use a little utility that let me 
> use ftp with a
> >config script something like:
> >
> >Ftpget fred.cfg
> >
> ...
> >I don't know what to google to find this utility. Does 
> anyone know what it's
> >called. Or, could it already be in the SCO 5.7 release?  I 
> know it wasn't in
> >5.6 and it was difficult or impossible to use FTP in this 
> simple way with
> >these little config files. 
> 
> I don't think I've ever used ftpget, but there are several
> options to do this including wget, ncftp, and curl, all open
> source and readily available.
> 
> I often use rsync for things like this as (a) it's much more
> efficient than ftp when transferring files that have been
> changed, and need to update an existing copy, (b) using the rsync
> server and modules, it's easy to do secure transfers without
> having to use ssh keys with empty pass phrases.
> 
> I also found that the python urllib makes transfers like this
> pretty easy in python scripts.  I had used it many times to get
> files with http URLs, but never had tried with ftp URLS, and it
> Just Worked(tm).  A simple example:
> 
> #!/usr/bin/env python
> 
> import urllib
> 
> user = 'somebody'
> pass = 'secret'
> host = 'ftp.example.com'
> url = 'ftp://%s:%s@%s' % (user, pass, host) # which is the same as:
> url = 'ftp://somebody:secret@ftp.example.com'
> 
> (fname, header) = urllib.urlretrieve(url)
> 
> # fname now contains the file name of a temporary file containing
> # the file transferred.  This must be copied or renamed before
> # exiting the program as the temp file is removed automatically.
> #
> import os
> os.rename(fname, '/tmp/myfile.data')
> 
> # header contains the HTTP headers returned by the call, and
> # should probably be checked for abnormal results.
> 
> Bill
> -- 
> INTERNET:   bill at celestial.com  Bill Campbell; Celestial Software LLC
> URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
> Voice:          (206) 236-1676  Mercer Island, WA 98040-0820
> Fax:            (206) 232-9186  Skype: jwccsllc (206) 855-5792
> 
> You know the one thing that's wrong with this country? Everyone gets a
> chance to have their fair say.  -- Bill Clinton, May 29, 
> 1993, The White House
> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com
> http://mailman.celestial.com/mailman/listinfo/filepro-list
> 



More information about the Filepro-list mailing list