Digg StumbleUpon LinkedIn YouTube Flickr Facebook Twitter RSS Reset
Comments Off

Perl: download file from FTP server

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:

  • perl ftp socket programming
  • ftp file download using perl
  • read the text file from ftp server using java
  • perl ftp tool sql
  • Ftp.Download File LastModified
  • read ftp text file using java
  • perl file username
  • downloading text files from ftp server using java
  • delete files in ftp server using java
  • how to read ftp files in perl remove file

No comments yet.

Leave a Comment

Switch to our mobile site