Search the web
Sign In
New User? Sign Up
net-ftp-common
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want your group to be featured on the Yahoo! Groups website? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
file delete?   Message List  
Reply | Forward Message #63 of 71 |
Re: [net-ftp-common] file delete?

Hi Alan,

> Is it possible to use Net::FTP::Common to delete files on the host, or
> do I have to use Net::FTP or some other module?

I just added a method to Net::FTP::Common to do this. There was
already one in Net::FTP --- mine just calls that one.

Version 5.2f on CPAN has the docs and new functionality. If you need
to add it fast, just add this sub, but the samples/delete-file in the
distro has a good example of it's use

sub delete {
my ($self,%cfg) = @_;

my $ftp = $self->prep(%cfg);
my $rf = $self->GetCommon('RemoteFile');


warn Dumper \%cfg;

$ftp->delete($rf);

}

### sample use

use Data::Dumper;
use Login;
use Net::FTP::Common;

our %netftp_cfg =
(Debug => 1, Timeout => 120);


$ez = Net::FTP::Common->new(\%Login::common_cfg, %netftp_config);
$ez->delete(RemoteDir => 'tmp', RemoteFile => 'upfile');




Fri Aug 26, 2005 4:19 am

bauhaus@...
Send Email Send Email

Forward
Message #63 of 71 |
Expand Messages Author Sort by Date

Is it possible to use Net::FTP::Common to delete files on the host, or do I have to use Net::FTP or some other module? Thanks! - Alan...
humphreyalan
Offline Send Email
Aug 26, 2005
2:05 am

Hi Alan, ... I just added a method to Net::FTP::Common to do this. There was already one in Net::FTP --- mine just calls that one. Version 5.2f on CPAN has the...
Terrence Brannon
bauhaus@...
Send Email
Aug 26, 2005
4:19 am
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help