Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

Copy to Webfolder

by bitman (Scribe)
on Jul 02, 2002 at 10:49 UTC ( #178814=perlquestion: print w/replies, xml ) Need Help??
bitman has asked for the wisdom of the Perl Monks concerning the following question:

Is it possible to copy a file (in perl obviously) to a webfolder?
Is there a module?
Do I need a module?
What is that module? :)

Replies are listed 'Best First'.
Re: Copy to Webfolder
by amphiplex (Monk) on Jul 02, 2002 at 10:54 UTC
    Hi !

    You could try the perlDAV page on, they have a lot of information concerning WebDAV.

    ---- kurt
(wil) Re: Copy to Webfolder
by wil (Priest) on Jul 02, 2002 at 11:02 UTC
    Yes, it is possible to transfer files from one machine to another using Perl. What exactly do you mean as a 'webfolder', though, I'm not sure.

    You will most likely need a module. If you take a look at CPAN, you will find Net::FTP and Net::TFTP might do what you require, amongst many others.

    If you can be a bit clearer in your definition of 'webfolder' and what kind of file you want to transfer and from where the current file is stored, then we will be more able to give you a more definitive answer.

    Hope this helps.

    - wil
Re: Copy to Webfolder
by Corion (Pope) on Jul 02, 2002 at 11:00 UTC

    Modules are the wheels we have already invented - they contain nicely packaged routines without exposing and requiring too much of the internal workings. Many ways to accomplish tasks have already been written as modules, so while you don't necessarily need a module in the general sense, you, as you're not looking for the back-to-nature reinvent-every-wheel way of doing things, in this special case will need every module that helps you.

    Now, we need to find out, what modules and mechanisms will help you to do your task. First of all, we need to know about your task - what is a webfolder ?

    If that webfolder is something accessible via your browser, the chances are quite good that the LWP modules, possibly LWP::Simple, but for file uploads more LWP::UserAgent together with HTTP::Request::Common will do the tasks, together with nice and accurate examples.

    perl -MHTTP::Daemon -MHTTP::Response -MLWP::Simple -e ' ; # The $d = new HTTP::Daemon and fork and getprint $d->url and exit;#spider ($c = $d->accept())->get_request(); $c->send_response( new #in the HTTP::Response(200,$_,$_,qq(Just another Perl hacker\n))); ' # web
Re: Copy to Webfolder
by bitman (Scribe) on Jul 02, 2002 at 11:28 UTC
    Thanks for you replies, by 'Webfolder' I mean the link that appears under 'My Computer' on NT, dbl-click then 'Add Web Folder' then you enter the url and then user/password.
      Yes we got that. (btw Web Folders are not specific to NT, they are an option availble w/ IE umm 5.5 I believe). Web Folders is Microsoft's support for WebDAV in Windows. amphiplex pointed you in the right direction. More directly you might read about HTTP::DAV or HTTP::WebDAV (however that requires neon, and you are on win32 so getting neon could prove difficult).

      perl -pew "s/\b;([mnst])/'$1/g"

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://178814]
Approved by little
and cookies bake in the oven...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2018-05-25 03:39 GMT
Find Nodes?
    Voting Booth?