Solved

Batch file to FTP into server and download folders

Posted on 2004-08-23
7
1,081 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
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 
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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo‚Ķ
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

810 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