Download directory tree with FTP GET

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
Pictor
Posts: 1
Joined: 25 Aug 2009 07:15

Download directory tree with FTP GET

#1 Post by Pictor » 25 Aug 2009 07:23

Hi all, I'm just registered!

I need to automate a Batch DOS script to automatically download an enteire directory tree, using FTP.
It should include either subdirectories, either subfiles.

How can I do this?

Now I do something like:

Code: Select all

>cd c:
>cd "C:\DownloadFTP\"
>ftp -A <ip_address>

ftp>cd "\U:\SourceFTP"
ftp>cd "Dir One"
ftp>get "FileOne.txt"
ftp>cd ..
ftp>cd "Dir Two"
ftp>get "FileTwo.txt"


... but I don't know how subdirectory are there or how (and what) files are contained.

How can I just GET *all* the content of the "SourceFTP" directory?


Thank you a lot!

Post Reply