Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

FTP stuff

by vroom (Pope)
on May 26, 2000 at 18:48 UTC ( #14988=sourcecodesection: print w/ replies, xml ) Need Help??
ftpbackup
on Nov 09, 2001 at 16:48 UTC
by enaco

Script to get same set of files from multiple hosts saving them as hostname.filename using a seperate host and file list (entries are seperated by a newline) so people wont mess up the code by misstake adding hosts or files to get.
I use it for backup

(code) Just Another Net::FTP Script
on Jun 20, 2001 at 07:12 UTC
by ybiC
One of our serverdudes asked me for help this afternoon with automating an FTP transfer from one of his NT servers to another department's UNIX host.   With an ever-so-slightly-evil "Perl can do that!" at the ready, I whipped up this ditty.   I'm rather pleased at finally being able to "just whip up some Perl".   {grin}
  • Non-interactive script to upload a file to specified FTP server.
  • Intended to be run repeatedly from (cron|at|scheduler).
  • Logs success or failure with timestamp and Perl+module versions.
  • Would be trivial to tweak for multiple files.
  • Source, dest, and log files should usually be specified by full filespec.

Thanks and ++ to Kevman, grinder, jeffa, and damian1301 for feedback.

As always: Critique, corrections and comments are wildly welcomed.

Updated   2001-06-21 19:35 CDT

ftpsync
on May 30, 2001 at 07:11 UTC
by etchorner
I cranked this one out after getting tired of either updating files on my website one by one as they are changed or using ncftpput to send 'em all.

It acts as a primitive 'rsync' clone. I use it to compare a local set of files to a remote set. It will create remote files and directories when new local copies are introduced, and will only upload existing files if the local file has a mtime (modification time) newer than the remote file. It's ugly, but it's handy for me on my slow connection to keep my web site up to date.

It's real ugly, it may not be portable, and I could use any advice you all have to offer.

ftplist.pl
on Feb 01, 2001 at 06:55 UTC
by jjdeterick
I'm new to perl, and this is one of my first attempts. I welcome any pointers on any easier/better ways to do this. Anyway, I hope this helps someone. Thanks, Enjoy
Program: ftp.pl                                        
Author: jjdeterick                                     
Date: 1/31/00                                          
Description:                                           
  This perl program will read a list of file names and
  get those files from a specified host.  The user    
  must first create a text list of the files to fetch 
  and enter the host, username, password and remote   
  directory that houses the files in the code.        
Perl FTP
on Oct 23, 2000 at 21:47 UTC
by Khürt
ftp.pl [-netrc] [-u <i>user</i>] [-p <i>passwd</i>] -m server -s source_dir -t target_dir [-log_dir <i>/path/to/logs/file</i>] file1 file2 ...

# Copyright 2000 Williams Interactive, Inc.
# Programmer: Khurt Williams, 2000.10.18
# command switches are
# -netrc : uses .netrc file to find user/passwd for the destination server 
# -u <i>user</i> : specify the user id
# -p <i>passwd</i> :specify the passwd for user id
# -m server : server ip or name
# -s source_dir : source dir
# -t target_dir : target dir
# -log_dir <i>/path/to/logs/file</i> : location of log file
multiftp.pl
on May 05, 2000 at 16:24 UTC
by ergowolf
This script gets multiple files from multiple file servers. It requires some minor tweaks to change the script. For example, you could change get to put or the user name from Randal to vroom. It will take aas many servers and files as you would like.
Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (5)
As of 2014-08-23 10:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (173 votes), past polls