Gossamer Forum
Home : General : Perl Programming :

Need help for this ... URGEND

Quote Reply
Need help for this ... URGEND
Hi,
Once again I need some help of some professionals.

I need a script which goes into a specific URL of an other server and copy all
files with the extension *.exe into the path where the script is running.

This has to be done once a day - if possible automatically at a given time.
Do anyone know how to handle this ????


Bye Diemo
Quote Reply
Re: Need help for this ... URGEND In reply to
What OS is this script running on? What OS is the server running who's URL you are going to?

-- Gordon --

------------------
$blah='82:84:70:77';
print chr($_) foreach (split/:/,$blah);
Quote Reply
Re: Need help for this ... URGEND In reply to
Take a look at this: http://www.fast.no/




------------------
Complete Index of Web Master's Resources: http://www.cellwarp.com
Quote Reply
Re: Need help for this ... URGEND In reply to
It looks like FAST doesn't distribute their software anymore Frown

Is there a way to list the files on remote machine like FAST does?

Thank you in advance.




------------------
Complete Index of Web Master's Resources: http://www.cellwarp.com
Quote Reply
Re: Need help for this ... URGEND In reply to
Hi,

sorry but I think all of you misunderstand me. ( I must regret my english is very poor )
I am using a Unix Server and I need this CGI script not to display the files but to copy them to my own server. These files are on different mashines (NT AND Unix). At a fixed time the CGI shall read a directory on a specific server and shall copy the files with a specific extension like *.exe or *.jpeg to my server.

Fast.no only displaying directories.


Thank you very much for your help.
Diemo
Quote Reply
Re: Need help for this ... URGEND In reply to
It doeasn't matter what the output will be -- it's pretty easy to change from displaying to copying files. Here's my idea step-by-step:

1. Read remote directory.
2. Sort out whatever files we need.
3. Write, display, or whatever we want to do with these files.

The only thing stops me from writing this script is that I don't know how to read the remote directories. Could anybody give me a hint on reading remote dirs?

Thank you in advance.




------------------
Complete Index of Web Master's Resources: http://www.cellwarp.com
Quote Reply
Re: Need help for this ... URGEND In reply to
Hi Pasha1 and all others,

thank you for this first hint. As Pasha1 pointed out this is what I am looking for.
Do anybody know how to go on ?

Bye Diemo
Quote Reply
Re: Need help for this ... URGEND In reply to
For two days I've been searching http://www.perl.com for the information on how to read the contents of remote directories, but couldn't find any hints. Frown
Yes, they do have some very nice info w/ links, but no information on the topic we have here.
I've looked at HTTP module, and it looks like it can do the job, but I'm not familiar with it at all.
Please, if anyone knows any information on how to read the remote directories, please reply!

Thank you in advance.




------------------
Complete Index of Web Master's Resources: http://www.cellwarp.com
Quote Reply
Re: Need help for this ... URGEND In reply to
perldoc LWP

I've never had the need for any HTTP scouring scripts but the docs for it seem pretty straight forward.
Code:
$ua = New LWP::UserAgent;
$your_request = new HTTP::Request POST => Your_request;
$blah = $ua->request($your_request);
print $blah->content if ($blah->is_success);

-- Gordon --


------------------
$blah='82:84:70:77';
print chr($_) foreach (split/:/,$blah);
Quote Reply
Re: Need help for this ... URGEND In reply to
Gordon, what does your code means?
Can you explain what, where, and how.

Thanks for the reply!




------------------
Complete Index of Web Master's Resources: http://www.cellwarp.com
Quote Reply
Re: Need help for this ... URGEND In reply to
GClemmons - Please explain what your code means and how it works.
What is Your_request, whould it be changed to URL? What is $blah?
I've tried playing with this code, but couldn't get much done Frown

Thanks in advance.




------------------
Complete Index of Web Master's Resources: http://www.cellwarp.com
Quote Reply
Re: Need help for this ... URGEND In reply to
Nevermind, I got it.




------------------
Complete Index of Web Master's Resources: http://www.cellwarp.com