Hi Dan,

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.

Cheers,
Levon Barker

> -----Original Message-----
> From: Dan Muey [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, July 16, 2003 11:39 AM
> To: perl beginners list
> Subject: Net:FTP to copy a file
>
>
> Howdy group,
>
> Any body have any suggestions on the best way to copy a file with
> Net::FTP?
>
> I don't want to simply rename() a file as I want to keep the
> existing one and create a new file that is the same.
>
> I know how to use stor() to use content in variables:
>
> my $stor = $ftp->stor("copyoforig.txt");
> $stor->write($fileguts, length($fileguts));
> $stor->close();
>
> My question would be how would I use retr() to get 'orig.txt'
> into the variable $fileguts?
>
> Would I simply do: $fileguts = $ftp->retr('orig.txt');
>
> TIA all you wonderfull Perl folks!
>
> Dan
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


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

Reply via email to