Copying a folder

J

Jim

Hi,

My company has an office in Europe. I oftem have to download
files/directories from a server there. I'd like to write a script
that will download these dirs automaticaly for me. I can access the
files via a browser (it is a windows view, has "parent direcoty" link,
etc), I right click the directory, copy it, and then paste the dir to
my hard drive.

I'm not sure how to go about doing this in perl. Any help or thoughts
would be appreciated.
 
A

A. Sinan Unur

(e-mail address removed) (Jim) wrote in
Hi,

My company has an office in Europe. I oftem have to download
files/directories from a server there. I'd like to write a script
that will download these dirs automaticaly for me. I can access the
files via a browser (it is a windows view, has "parent direcoty" link,
etc), I right click the directory, copy it, and then paste the dir to
my hard drive.

I'm not sure how to go about doing this in perl. Any help or thoughts
would be appreciated.

I am guessing you are on Windows accessing a share on a Windows server.
As far as I can see, there is no point in writing a script for this. Just
write a batch file with the appropriate copy command in it.

Sinan.
 
T

Tad McClellan

Jim said:
My company has an office in Europe. I oftem have to download
files/directories from a server there.


What kind of server?

An FTP server? A web server? ...

I'd like to write a script
that will download these dirs automaticaly for me. I can access the
files via a browser


Looks like a web server then.

I'm not sure how to go about doing this in perl.


perldoc -q fetch

How do I fetch an HTML file?
 
G

Gregory Toomey

Jim said:
Hi,

My company has an office in Europe. I oftem have to download
files/directories from a server there. I'd like to write a script
that will download these dirs automaticaly for me. I can access the
files via a browser (it is a windows view, has "parent direcoty" link,
etc), I right click the directory, copy it, and then paste the dir to
my hard drive.

I'm not sure how to go about doing this in perl. Any help or thoughts
would be appreciated.

Use Rsync or wget
http://samba.anu.edu.au/rsync/

gtoomey
 
T

Tassilo v. Parseval

Also sprach A. Sinan Unur:
(e-mail address removed) (Jim) wrote in


I am guessing you are on Windows accessing a share on a Windows server.
As far as I can see, there is no point in writing a script for this. Just
write a batch file with the appropriate copy command in it.

It might equally well be an FTP server. Windows has the uncanny ability
to squeeze everything into the Explorer-mindset (dragging around folders
etc.). That may be nice for a user who basically gets away with only one
concept, but it creates analogies where there shouldn't be any from a
technical point of view.

Tassilo
 
J

Jim

Thanks for the help.

I can only access the information viz http. ftp will not work. wget
is not supported in the dos cmd window.
 
J

James Tolley

Jim said:
Hi,

My company has an office in Europe. I oftem have to download
files/directories from a server there. I'd like to write a script
that will download these dirs automaticaly for me. I can access the
files via a browser (it is a windows view, has "parent direcoty" link,
etc), I right click the directory, copy it, and then paste the dir to
my hard drive.

use LWP::Simple;

mirror('http://www.whereever.com/etc/etc.html','C:/whereever/file.html');
 
A

A. Sinan Unur

(e-mail address removed) (Jim) wrote in @posting.google.com:
Thanks for the help.

I can only access the information viz http.
^^^ via

Why did you not say so in your first post?
wget is not supported in the dos cmd window.

Are you really running in DOS or are you referring to the cmd.exe shell
in a NT/2K/XP environment. Your statement is false in both environments:

http://www.google.com/search?sourceid=mozclient&ie=utf-8&oe=utf-8
&q=wget+windows

http://www.rahul.net/dkaufman/

It is now fully established that your question is not Perl related.

If you would like to write a wget work-alike in Perl, check out LWP. Once
you have some code, post questions related specifically to your code.
 
J

Jim

Thanks again for all the help.

I am trying wget in a cmd.exe shell, sorry.

I'm getting a permisson denied error when I try mirror.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,164
Messages
2,570,901
Members
47,440
Latest member
in3dagenonline

Latest Threads

Top