Bioperl: recursive ftp...

Tom Tang tang@incyte.com
Tue, 27 Apr 1999 17:13:46 -0700


Hi Dawn,

Here is the simplest code to do the task:
------------------------------------------------------
#!/usr/local/bin/perl

open (FTP, "|ftp -n MACHINE_NAME");
print FTP "user USER_NAME USER_PASSWD\n";
print FTP "cd DIRECTORY_YOU_WANT\n";
print FTP "get FILE_YOU_WANT\n";
print "bye\n";
close FTP;
----------------------------------------------------------

Tom Tang
Incyte Pharmaceuticals, Inc.
Palo Alto, CA


dfield@molbiol.ox.ac.uk wrote:

> What I'd like is a script that just goes to a specified host, logs in,
> cd's to the directory and then ftps the named files.  Does anyone have perl
> code that does this?
> At CPAN I found a shell archive but it's from 1993 and I can't contact the
> author with the e-mail given...
>
> thanks,
> Dawn
>
> Dawn Field
> Oxford Univerisity
> Molecular Infectious Diseases Group. IMM
> John Radcliffe Hospital
> Headington
> Oxford OX3 9DS
>
> e-mail: dfield@molbiol.ox.ac.uk
>
> tel: 011-44-1865-222346 or 222347
> fax: 011-44-1865-222626
>
> =========== Bioperl Project Mailing List Message Footer =======
> Project URL: http://bio.perl.org/
> For info about how to (un)subscribe, where messages are archived, etc:
> http://www.techfak.uni-bielefeld.de/bcd/Perl/Bio/vsns-bcd-perl.html
> ====================================================================



=========== Bioperl Project Mailing List Message Footer =======
Project URL: http://bio.perl.org/
For info about how to (un)subscribe, where messages are archived, etc:
http://www.techfak.uni-bielefeld.de/bcd/Perl/Bio/vsns-bcd-perl.html
====================================================================