Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Copy folder using Net::FTP
I am new in PERL programming...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......

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.

Report this thread to moderator Post Follow-up to this message
Old Post
Roime bin Puniran
09-22-04 08:57 PM


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/Archiv.../Archive/Tar.pm>


--
Chris Devers

Report this thread to moderator Post Follow-up to this message
Old Post
Chris Devers
09-22-04 08:57 PM


RE: Copy folder using Net::FTP
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 prob
lem 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:cdevers@pobox.com]
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/Archiv.../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.

Report this thread to moderator Post Follow-up to this message
Old Post
Roime bin Puniran
09-22-04 08:57 PM


Re: Copy folder using Net::FTP
roime@rndtm.net.my (Roime bin Puniran) wrote in message-id:
< 797EE728F2A2A24AB7A7FA2ADB6CE6B36F3831@p
roliant1>
>
>I am new in PERL programming...I have one question to ask..How can i transfer a fol
der 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 
any
bony have any idea?....Please help me......
>
>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.

The program should  first issue the appropriate MKD commands,
then issue all of the appropriate STOR commands.



Report this thread to moderator Post Follow-up to this message
Old Post
$_@_.%_
09-23-04 01:58 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PERL Beginners archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 05:15 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.