http://www.perlmonks.org?node_id=116681

Darkness Productions has asked for the wisdom of the Perl Monks concerning the following question:

I need to gather files from multiple remote machines, preferably using TCP/IP or some other method. The files will most likely not be on any share, so is there a way to go about this? Connecting to Windows and *nix machines is a must though.

Originally posted as a Categorized Question.

  • Comment on How do I gather files from remote machines?

Replies are listed 'Best First'.
Re: How do I gather files from remote machines?
by projekt21 (Friar) on Oct 04, 2001 at 19:19 UTC

    Your problem is not the client machine, as there are many Perl-Modules out there doing the dirty work for you (including Net::FTP).

    Your problem is the server side: you need one or more protocols there to make your files accessible to your client. If you manage to run FTP (or HTTP, or whatever) on your *nix and Windows machines and manage to access those files with standard client software, the perl stuff to automate that all is quite simple (if you read your documentation).

    If you have chosen one or more protocols for your servers, managed to run them and still have trouble with your client side perl, come back and you will be helped.

Re: How do I gather files from remote machines?
by ariels (Curate) on Oct 04, 2001 at 18:43 UTC
    If your hosts support FTP, you can script interactions using Net::FTP (CPAN).

    Other protocols exist, of course. If you administer the machines, rsync is a distinct possibility.

Re: How do I gather files from remote machines?
by projekt21 (Friar) on Oct 09, 2001 at 15:38 UTC

    It is the same problem. The difference is that now your server must act as a client and your clients must act as servers. Install some FTP server on your clients and use Net::FTP as client on your server (uuuh, confusing). Otherwise you need to run some kind of upload-script on each client if this suits better.

Re: How do I gather files from remote machines?
by Darkness Productions (Initiate) on Oct 09, 2001 at 01:36 UTC
    Hmm... actually, no. I need the server to gather files from the client. The code is run on the server side, hopefully in attempts to gather the files from the client, without much effort. It's basically for a stats gathering script, where the files are pulled from the clients (via internal network I would guess). Ideas?

    Glen