in reply to Re: FTP Module Suggestions
in thread FTP Question
In addition, you may also wish to look at the samples in the FTP Stuff section of the Code Catacombs.
You did not say why a standard FTP program was failing. Is it timing out? Failing because of the size of the directory? Or was it failing because you need something with a little more power to do things like lowercase or uppercase all filenames, remove spaces, and/or split the files into directories by one or more initial letters or something?
Hopefully the excellent references suggested thus far by respondents to your post will be of help. Failing that, posting additional information may allow someone to offer you additional ideas or snippets that may be useful. In either case, I hope you find what you seek, and, perhaps, will even take time to post the solution you find, to aid those who may come after with similar needs.
Update: You may also wish to check the Snippets Section for postings. grinder has an interface which may make that easier to do for what you seek.
Update: Found a basic snippet of code I had that might help you get started.
# # Assumes %filelist and %connectinfo defined and # filled earlier # my $ftp = Net::FTP->new($connectinfo{'host'}; $ftp->login($connectinfo{'user'}, $connectinfo{'pass'}); my $current_target_directory = ""; foreach my $filename (sort(keys(%filelist))) { if ($current_target_directory ne $filelist{$filename}{'target'}) { $current_target_directory = $filelist{$filename}{'target'}; $ftp->cwd($current_target_directory); } $ftp->put($filename); print($filename, "\n"); } $ftp->quit;
Update: Modified title.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: FTP Question
by LostS (Friar) on Dec 17, 2002 at 15:41 UTC | |
by waswas-fng (Curate) on Dec 17, 2002 at 16:30 UTC |