?
Solved

Batch file to FTP into server and download folders

Posted on 2004-08-23
7
Medium Priority
?
1,099 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
[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
  • Learn & ask questions
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
7 Extremely Useful Linux Commands for Beginners

Just getting started with Linux? Here's a quick start guide that has 7 commands that we believe will come in handy.

 
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 750 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

Percona Live Europe 2017 | Sep 25 - 27, 2017

The Percona Live Open Source Database Conference Europe 2017 is the premier event for the diverse and active European open source database community, as well as businesses that develop and use open source database software.

Question has a verified solution.

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

Developer portfolios can be a bit of an enigma—how do you present yourself to employers without burying them in lines of code?  A modern portfolio is more than just work samples, it’s also a statement of how you work.
There’s a good reason for why it’s called a homepage – it closely resembles that of a physical house and the only real difference is that it’s online. Your website’s homepage is where people come to visit you. It’s the family room of your website wh…
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
The viewer will learn how to dynamically set the form action using jQuery.
Suggested Courses

801 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