Solved

Batch file to FTP into server and download folders

Posted on 2004-08-23
7
1,075 Views
Last Modified: 2008-03-17
I want to create a batch file to FTP into a server, download all the folders and put them on the local machine. I have written most of the file but I can't seem to find a method of getting it to download all files and folders.

Can anyone help?

Thanks,

Jacob
0
Comment
Question by:jacobcolton
7 Comments
 
LVL 15

Expert Comment

by:joeposter649
ID: 11873500
What ftp client?
Have you tried mget?
0
 
LVL 10

Expert Comment

by:avidya
ID: 11874173
posting the code would also be helpfull
0
 

Author Comment

by:jacobcolton
ID: 11874215
I have tried mget and I just using the windows 2000 dos ftp prog.

Here is the code:

batch file:

@echo off
call ftp -s:ftp.$$$
cd c:\inetpub

ftp.$$$

open ftp.domain.co.uk
domain.co.uk
password
mget *.* c:\inetpub
0
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 15

Expert Comment

by:joeposter649
ID: 11874504
I think you want to use the -n  parameter along with -s and it might help to toggle "prompt" off.
Check out the help in w2k also...

batch file:

@echo off
call ftp -n -s:ftp.$$$
cd c:\inetpub

ftp.$$$

open ftp.domain.co.uk
domain.co.uk
password
prompt
lcd c:\inetpub
mget *.*
0
 

Author Comment

by:jacobcolton
ID: 11875447
It is saying cannot find list of remote files - there are 3 folders on the remote site, I want it to download all the folders and contents...
0
 

Author Comment

by:jacobcolton
ID: 11880524
Apparently mget cannot download folders and there contents. However I have now found a little program to do it....http://www.scriptftp.com/

Thanks for all your help....

Jacob
0
 
LVL 18

Accepted Solution

by:
arantius earned 250 total points
ID: 11881443
http://www.interlog.com/~tcharron/wgetwin.html

wget -r ftp://ftp.host.com/directory/

Use the batch file to change to the appropriate directory and just run that command.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
Accessibility and Usability are two concepts that seem to be closely related.  But, too many people seem to have a distorted perception of them. During last five years, those two words have come to the day-to-day work of almost every web develope…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now