Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Schedule FTP Transfers

  • 24-01-2007 09:57PM
    #1
    Registered Users, Registered Users 2 Posts: 1,452 ✭✭✭


    Not sure if this is the correct place to post. So please Mod move me if needs be! :)

    I'm jusr wondering if anyone has a solution *one you made earlier* for automating an FTP download of files from a webserver.

    I can see there are many ways of doing it, but I guess I'm just too lazy to figure it out myself!

    I'm using ubuntu 6.1! So if there are any nice proggies that will do it less manually than a command line prompt that suits me! :)

    Thanks!
    Tom


Comments

  • Moderators, Music Moderators Posts: 23,363 Mod ✭✭✭✭feylya


    What about setting up a cron job? Should be the quickest way of doing it...


  • Closed Accounts Posts: 6,300 ✭✭✭CiaranC


    Schedule a cron job for wget


  • Registered Users, Registered Users 2 Posts: 32,132 ✭✭✭✭is_that_so


    You can do it with Perl and then run it as a cron job. Here's some code. Perldoc will gives you more info.
    #!/usr/bin/perl
    
    use Net::FTP;
    use Cwd;
    
    my $server_name='servername';
    my $login='username';
    my $pword='password';
    my $dir='location of files on server';
    my $localdir='local directory';
    
    
    $ftp = Net::FTP->new($server_name);         # New object
    $ftp->login($login, $pword);       # log in
    
    $ftp->connect($server_name),"\n"; 
    $ftp->binary;
    $ftp->cwd($dir),"\n";   
    $ftp->get($filename); 
    $ftp->quit;
    
    


  • Registered Users, Registered Users 2 Posts: 1,452 ✭✭✭tomED


    I went with the cron job and wget - so far so good! :)

    Thanks everyone!


Advertisement