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?
script.ftp
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?
Code:
@ ECHO OFF
ECHO:
ECHO FTP Backup Script
ECHO =================
ECHO:
SET login_script="c:\...\script.ftp"
for /f "tokens=1-3 delims=/- " %%a in ('date /t') do set XDate=%%a%%b%%c
for /f "tokens=1-2 delims=: " %%a in ('time /t') do set XTime=%%a%%b
CD C:\backups\
IF EXIST %XDate%%XTime% GOTO NODIR
MD %XDate%%XTime%
CD %XDate%%XTime%
FTP -v -i -s:%login_script%
:NODIR
PAUSE
script.ftp
Code:
open 127.0.0.1
root
root
cd public_html
binary
mget *.*
disconnect
bye