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.
May 30, 2001, 10:28 PM
User (381 posts)
May 30, 2001, 10:28 PM
Post #2 of 2
Views: 2420
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
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