> Hi Dan,
> 

Howdy

> I was trying to figure something  like this a few months ago. 
> Needed to move a file to sub directory in the FTP server. All 
> in Net::FTP.
> 
> Decided it wasn't worth figuring out. Instead I retrieved the 
> file locally, deleted the file on the server, cwd to the 
> proper directory and then put it the file up to the server.
> 

I thought about that but it seems just as complicated and risks leaving lots of files 
around locally.
So I'll stick it out and make it work.
I'll figure it out and add it to my up and coming module (If it ever goes anywhere) as 
a simple routine:

        $ftp->cpfile($origfile,$newfile[,1]); # the '1' being whether to allow 
overwriting $newfile if it exists already.
The key,  I think is to make sure I understand retr()

I bel;eive this will work:


my $guts;       
        
# What I need to verify is that doing this will put $origfile's content into $guts:    
 

my $retr = $ftp->retr($origfile);
$retr->read($guts, $si);
$retr->close();
# ... or otherwise accomplish that. Anybody know if this is doing what I'm expecting 
it to do?

# I know this works for making $newfilename with $guts as it's content
my $stor = $ftp->stor($newfilename); 
$stor->write($guts, length($guts)); 
$stor->close();

Thyanks

DMuey
> Cheers,
> Levon Barker

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to