#!/usr/local/bin/perl use Net::FTP; use File::Find; @ARGV = "." unless @ARGV; sub showfiles { print "$File::Find::name/\n" if !-d; } my $dir = '/my/remote/directory/path'; my $host = '123.45.67.890'; my $login = 'userlogin'; my $passwd = 'userpassword'; my $ftp = Net::FTP->new($host); my $RC = $ftp->login("$userlogin","$userpassword"); if (not $RC) { print "\n\nFTP Login to Remote Host: '$host' failed!\n\n"; print "No files updated from Remote host: '$host'!\n\n"; exit; } # Go to the specified directory print STDERR "Changing directory to <$dir>\n" if ($DEBUG); if ($ftp->cwd($dir) == 0) { warn "$program: can't change directory to <$dir>\n"; return(1); } find(\&showfiles, @ARGV); $ftp->quit;