Digg StumbleUpon LinkedIn YouTube Flickr Facebook Twitter RSS Reset
Comments Off

Perl: download file from FTP server

Your ads will be inserted here by

Easy AdSense.

Please go to the plugin admin page to paste your ad code.

Perl: download file from  FTP server
{filelink=13113}

use Net::FTP;
$username = "test_username";
$password = "mypassword";
$remotefile = "index.html";                 # File to download
$ftp = Net::FTP->new("ftp.myFTPServer.com", Timeout => 60)
        or die "Could not connect to FTP server.";
$ftp->login($username, $password)
        or die "invalid username or password:$_!";
$ftp->cwd('/httdoc/site');                  # set working directory
# Save the file in the current directory
$ftp->get($remotefile, $remotefile)
        or die "Can not get file.";

Users who found this page were searching for:

  • sun.net.ftp.ftpclient getFile example
  • java ftp download text file
  • how to get last modified date in ftp using perl
  • perl download file from ftp
  • perl ftp tool sql
  • perl ftp download files created within
  • how to get last modified date of a file in java from ftp server
  • read ftp text file using java
  • ftp file download using perl
  • perl download file

No comments yet.

Leave a Comment

Switch to our mobile site