Solved

Batch file to FTP into server and download folders

Posted on 2004-08-23
7
1,078 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Link to post behind image slider 1 49
JavaScript communication inside a IFRAME 9 55
remove border from element 5 48
Cordova Camera plugin fails 2 91
Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
An enjoyable and seamless user experience can go a long way on an eCommerce site. While a cohesive layout and engaging copy play roles in creating a positive user experience, some sites neglect aspects that seem marginal but in actuality prove very …
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
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…

948 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

22 Experts available now in Live!

Get 1:1 Help Now