472,951 Members | 1,879 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,951 software developers and data experts.

FTP Download Directories Recursively

384 256MB
I have a script that will connect and download all the files in the root directory but I need to recursively download all sub-directories and their files, there could be sub-directories in sub-directories to the a maximum of 15 I'd say.

I know windows native FTP command doesn't support recursive download with mget but can anyone point me to a good script function that will do what I require or even help me out with the code I have already?

Expand|Select|Wrap|Line Numbers
  1. @ ECHO OFF
  2. ECHO:
  3. ECHO FTP Backup Script
  4. ECHO =================
  5. ECHO:
  6. SET login_script="c:\...\script.ftp"
  7. for /f "tokens=1-3 delims=/- " %%a in ('date /t') do set XDate=%%a%%b%%c
  8. for /f "tokens=1-2 delims=: " %%a in ('time /t') do set XTime=%%a%%b
  9. CD C:\backups\
  10. IF EXIST %XDate%%XTime% GOTO NODIR
  11. MD %XDate%%XTime%
  12. CD %XDate%%XTime%
  13. FTP -v -i -s:%login_script%
  14.  
  15. :NODIR
  16.  
  17. PAUSE
script.ftp
Expand|Select|Wrap|Line Numbers
  1. open 127.0.0.1
  2. root
  3. root
  4. cd public_html
  5. binary
  6. mget *.*
  7. disconnect
  8. bye
Jun 15 '11 #1
1 2942
ziycon
384 256MB
Anyone have any ideas on where to go next?
Jun 20 '11 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Ruby Tuesday | last post by:
Is there a fast way to read files/directory recursively? Instead of inspecting each file(s)/dir(s), is there a way to know that its a file or a directory from its hidden attribut both for windows...
1
by: Trinity | last post by:
Hi, I want to delete a particular file in all the sub-directories. I am using the SHFileOperation() API. But it is not deleting the files recursively. Any sample code is appreciated. TIA
1
by: Antonio Lopez Arredondo | last post by:
hi all !!! I need to copy a folder and its subfolders to another location; which class should I use ? could only find the System.IO.Directory.MOVE but don't know how to COPY. thanks in...
5
by: rbt | last post by:
What is the most efficient way to recursively remove files and directories? Currently, I'm using os.walk() to unlink any files present, then I call os.walk() again with the topdown=False option...
3
by: Kamen TOMOV | last post by:
Hi, Is uploading recursively directories to a web server possible with JavaScript? I mean is it possible read a directory recursively and dynamically construct <input type="file"> with value...
2
by: Rahul83 | last post by:
Hi.. I'm new to Perl programming. I need to compare two directories of similar structure... check all the subdirectories in it and generate a report of the changes in the files in all the...
2
by: Fabian Steiner | last post by:
Hello! As far as I can see os.chmod() doesn't adjust permissions on directories recusively. Is there any other possibility to achieve this aim except for calling os.system('chmod -R /dir')...
1
by: ArchanaAshok | last post by:
Hi All, I have done a script to compare 2 similar directories containing equal number of files, and to compare the content of those files in the directories. But there is some problem in the...
9
by: bhumikas | last post by:
Hi all, I need a help in perl script.The basic idea is,it must have command line arguments for the user flexibility.the files are in the format as shown below. MainFolder Directory ...
3
by: misceverything | last post by:
I am writing a script that will backup specified folders from one hard drive to another (for example, backup source "C:\DATA", destination "D: \Backup"), and was thinking of using shutil. What I...
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.