Solved

Batch file to FTP into server and download folders

Posted on 2004-08-23
7
1,091 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
Transaction Monitoring Vs. Real User Monitoring

Synthetic Transaction Monitoring Vs. Real User Monitoring: When To Use Each Approach? In this article, we will discuss two major monitoring approaches: Synthetic Transaction and Real User Monitoring.

 
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

The Ultimate Checklist to Optimize Your Website

Websites are getting bigger and complicated by the day. Video, images, custom fonts are all great for showcasing your product/service. But the price to pay in terms of reduced page load times and ultimately, decreased sales, can lead to some difficult decisions about what to cut.

Question has a verified solution.

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

Learn by example how to specify CSS selectors for Selenium WebDriver test automation software.
Because your company can’t afford for you to make SEO mistakes, you’ll want to ensure you’re taking the right steps each and every time you post a new piece of content. This list of optimization do’s and don’ts can help you become an SEO wizard.
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.

689 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