I use the Net::FTP module.
use Net::FTP;
then write wrappers for the functions I want, like:
ftp_get_files
ftp_put_files
ftp_lst_files
The Perl version is much like what you would expect from an FTP command line
client.
Here's an example of how to connect to the server...
my $ftp = Net::FTP->new($ftpserver) || fatal_error("FTP.pm ERROR: Could not
connect to $ftpserver: [EMAIL PROTECTED]");
$ftp->login($ftpuser, $ftppwd) || fatal_error("FTP.pm ERROR: Could
not login to $ftpserver as $ftpuser\n");
And how to disconnect...
$ftp->quit;
Hope this helps...
cn
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Craig
Cardimon
Sent: Thursday, June 24, 2004 7:03 AM
To: [EMAIL PROTECTED]; [email protected]
Subject: FTP script
I need to write a script that will FTP files from a web site. I know
this can be done (on a Mac anyway), but I have never written one.
I'd like this script to be able to open an FTP web site, check my
computer to see which files I already have, then commence
downloading/copying the ones I do not have to my harddrive. The script
would repeat the procedure should any timeouts or freezeups occur.
If any of you kind folks would point me in the right direction, I would
appreciate it.
-- Craig
_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs