Gossamer Forum
Home : General : Perl Programming :

Net::FTP Project

Quote Reply
Net::FTP Project
I'm working on a project that will be kind of like palavista.com or oth.net. What I'm trying to do is write a script that will log in to several FTP's at given intervals and log all of the files on the server to a MySQL DB to be searched by users. I already have the script doing basically what I want but I am having trouble making it change directories and list the contents of those directories. Keep in mind that many FTP servers go 10+ directories deep and I need to get the contents of each directory without missing directories along the way. I'm at the end of my rope. Any help would be GREATLY appreciated.

Quote Reply
Re: Net::FTP Project In reply to
use a function to explore a directory.. and put it inside of itself.. ie:

sub get_directory {
# get list of files/folders
# foreach folder &get_directory (); it.. add list of files to list from dir to this dirs list of files
# return list of files with full paths
}

Jerry Su
http://www.jsu07.com