Thanks for ur reply..Actually, i need to transfer a folder that continously updated. 
It's so difficult to tarball a directory first then send it through Net::FTP while the 
content of the directory always updated...I mean my problem is, i need to transfer a 
folder without tarball it first using Net::SFTP..I hope i make it clear...

However, thanks Chris following ur advice


-----Original Message-----
From:   Chris Devers [mailto:[EMAIL PROTECTED]
Sent:   Mon 9/20/2004 1:26 PM
To:     Roime bin Puniran
Cc:     Perl Beginners List
Subject:        Re: Copy folder using Net::FTP
On Mon, 20 Sep 2004, Roime bin Puniran wrote:

> I am new in PERL programming...

Okay -- it's "Perl" for the language, "perl" for the program that runs 
programs written in the language, and "PERL" for nothing. In spite of 
what some of the docs jokingly say, "Perl" doesn't stand for anything, 
so it shouldn't be capitalized as if it's an acronym.

> I have one question to ask..How can i transfer a folder in 2 different 
> machine using Net::FTP...Now, i can transfer a sigle file between 2 
> machine but i am still having problemm to transfer a folder using 
> Net::FTP...Did anybony have any idea?....Please help me......

Would making a tarball out of it be an option?

That's the old-fashioned but proven way to send directories full of 
files around: make a tarball (`tar -cvf files.tar dir/`), send it to the 
remote machine, then unpack it (`tar -zxv files.tar`).

If you're on Windows, a zip archive is roughly equivalent, but I'm not 
sure how that could be driven from Perl (I'm sure it could be done, I 
just don't know what way makes sense). On the other hand, Archive::Tar 
should be able to do it nicely:

<http://search.cpan.org/~kane/Archive-Tar-1.10/lib/Archive/Tar.pm>
 

-- 
Chris Devers





This e-mail and any attachments may contain confidential and
privileged information. If you are not the intended recipient,
please notify the sender immediately by return e-mail, delete this
e-mail and destroy any copies. Any dissemination or use of this
information by a person other than the intended recipient is
unauthorized and may be illegal.
-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>

Reply via email to