Solved

Posted on 2008-10-27
565 Views
I connect to an ftp server daily which has a bunch of folder and files within those folders....is there any way to download them automatically everyday at a certain time using windows or a freeware FTP program?

0
Question by:dealstrike
[X]
###### Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

• Help others & share knowledge
• Earn cash & points
• 23
• 14

LVL 16

Expert Comment

ID: 22814931
Hi,

You can completely automate it using a windows script file run as a task.

Go here for a good reference:

http://www.robvanderwoude.com/ftp.html#UnattendedFTP

Good Luck,

- gurutc
0

LVL 40

Expert Comment

ID: 22815065
0

Author Comment

ID: 22815190
Little bit confusing...
i was able to create the batch file to call the ftp text
It does log in the user but I am not sure how to select all the folders and copy them to a certain directory?
0

Author Comment

ID: 22815203
Also....sometimes there me update on the file but the filename renames the same? Does it prompt for an overwrite?
0

LVL 40

Expert Comment

ID: 22815300
First, you can not use script to down load directories. You need for that to use wget:

http://pages.interlog.com/~tcharron/wgetwin.html

if you are going to download multiple files from the same dir, then use

prompt
mget *.ext
0

Author Comment

ID: 22815397
First of all...your answers are extremely vague...you should understand that in this matter I dont have as much knowledge as you...hence why I selected beginner when given the option

And there has to be a simpler way to do this?
0

LVL 40

Expert Comment

ID: 22815433
Can you clarify what you want to do with example?
0

Author Comment

ID: 22815483
Sure, absolutely
I connect to an ftp server ftp.bbb.com
with user aaa pass bbb
On this ftp server there are about 15 folders (directories), and several files in each of these folders...
ftp.bbb.com
FolderA (Inside the folder there are files aaa.xls, aaa.doc)
FolderB (Inside the folder there are files bbb.xls, bbb.doc)
FolderC (Inside the folder there are files ccc.xls, ccc.doc)
I need to copy all those folders/files into say a server called server1 (e:\portfolio)
Thanks
0

Author Comment

ID: 22815495
Sorry...I should say I need the script to copy (and replace if files are already existent) the files in all those folders daily to that location....and if there are any folders that are added the ftp I want it to copy those too
0

LVL 40

Expert Comment

ID: 22815719

e:
cd \portfolio

if this works then put the commands in .bat file
0

Author Comment

ID: 22815789
To install I just extract wget and click on the exe? A cmd box comes up and quickly goes away and thats it?
0

LVL 40

Expert Comment

ID: 22815809
ok from start go to run then type cmd then enter. to find location of wget run

cd \
dir -s wget*.*
0

LVL 40

Expert Comment

ID: 22815824
or

dir /s
0

Author Comment

ID: 22815827
And do i type the above on 3 seperate lines in the command prompt?
h:\c:
c:\> cd \portfolio
then
?
0

Author Comment

ID: 22815862
I see it on my desktop...I extracted it fine
But then I see the folder and double click on wget.exe and get what I said before

wget1.JPG
0

LVL 40

Expert Comment

ID: 22815869
yes, but I thought your dir is on e dirve
0

Author Comment

ID: 22815894
It is on the C...I just used e as an example...I will use c from now on
Ok, so I guess its installed (I double clicked on wget.exe a cmd box came up and went away after a second)
Then I tried

h:\c:
c:\> cd \portfolio
then
And I get  "the system cannot find the path specified"
0

Author Comment

ID: 22815908
and instead of portfolio my folder is called ftp so its
h:\c:
c:\> cd \ftp
then

0

LVL 40

Expert Comment

ID: 22816017
please replace \path\to by the dir name in which wget is. This is the dir to which wget.exe was extracted
0

Author Comment

ID: 22816078
So it will be ...
?
0

Author Comment

ID: 22816091
It is extracted into c:\wget
0

LVL 40

Expert Comment

ID: 22816153
ok, run

c:
c:\> cd \portfolio

/dir at the end is the name of the dir on the ftp server
0

Author Comment

ID: 22816190

wget: unrecognized option --ftp-user=u41165610-bullrich'
Usage: wget [OPTION]... [URL]...
Try wget --help' for more options.
C:\ftp>
0

LVL 40

Expert Comment

ID: 22816233
can you show the full command you used?
0

Author Comment

ID: 22816251

C:\ftp> \wget\wget  --ftp-user=xxxx --ftp-password=aaaa -r -nH f
tp.3ianalysis.net/Qwest

wget: unrecognized option --ftp-user=u41165610-bullrich'
Usage: wget [OPTION]... [URL]...
Try wget --help' for more options.

0

LVL 40

Expert Comment

ID: 22816281
try

C:\ftp> \wget\wget  --ftp-user=xxxx --ftp-password=aaaa -r -nH ftp://ftp.3ianalysis.net/Qwest

please note the ftp:// before the ftp site name
0

Author Comment

ID: 22816300
Same result
0

LVL 40

Expert Comment

ID: 22816345
try this it is working:

\wget\wget -r -nH ftp://xxxx:aaaa@ftp.3ianalysis.net/Qwest
0

Author Comment

ID: 22816456
That worked very well....now if I want to put this on a network drive (which I am connected to via the Z: what would I do?
I want to put the folders in Z:\Folder
0

Author Comment

ID: 22816498
So next I would create a .bat file
and for all the folders put something like....
\wget\wget -r -nH ftp://xxxx:maaaa@ftp.3ianalysis.net/Qwest

\wget\wget -r -nH ftp://xxxx:maaaa@ftp.3ianalysis.net/CORS

\wget\wget -r -nH ftp://xxxx:maaaa@ftp.3ianalysis.net/MAS
etc?
0

Author Comment

ID: 22816670
Also...some of these folder names have spaces in them for example
AB AB
So it would be
ftp://xxxx:maaaa@ftp.3ianalysis.net/AB AB ?
0

LVL 40

Accepted Solution

omarfarid earned 500 total points
ID: 22818670
Sorry I was away.

You basically put the drive name e.g.

z: (put the drive name you want to work on)
c:\wget\wget -r -nH ftp://xxxx:maaaa@ftp.3ianalysis.net/Qwest (this will get you the dir Qwest and all sub directories from remote server)

If the parent dir you are trying to get has spaces in the name then

\wget\wget -r -nH "ftp://xxxx:maaaa@ftp.3ianalysis.net/AB AB"
0

Author Comment

ID: 22821357
Thats ok,
I am having issues installing wget and getting the script to run on other PCs...
The cmd box goes away so fast that I cant see whats going on (print scrn not quick enough either)
I want to put this on a server to run...
e:\folder1\folder2
so I put the wget extracted folder in folder2 and ran wget.exe
and my script is the same as before basically
except it is
e:
cd /folder1
cd /folder2
wget etc etc.
I think it is because it is not recognizing wget
0

LVL 40

Expert Comment

ID: 22821658
how can I help?
0

Author Comment

ID: 22821770
umm... cannot install the wget thing on other machines for some reason...I think thats why the batch file isnt running now..

I am having issues installing wget and getting the script to run on other PCs...
The cmd box goes away so fast that I cant see whats going on (print scrn not quick enough either)
I want to put this on a server to run...
e:\folder1\folder2
so I put the wget extracted folder in folder2 and ran wget.exe
and my script is the same as before basically
except it is
e:
cd /folder1
cd /folder2
wget etc etc.
I think it is because it is not recognizing wget
0

Author Comment

ID: 22822888
any idea, sorry to rush you
0

Author Comment

ID: 22823215
I figured it out
Thanks for your help! Will leave this question open for a day in case I have any other questions!
0

Author Comment

ID: 22831542
0

## Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction People like FTP.  It's a solid, stable, robust protocol for quickly transferring files between two hosts using TCP/IP.  In most cases it's much faster than SMB or CIFS, and certainly much easier to set up between organizations.  This…
Outsource Your Fax Infrastructure to the Cloud (And come out looking like an IT Hero!) Relative to the many demands on today’s IT teams, spending capital, time and resources to maintain physical fax servers and infrastructure is not a high priority.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…