BAT,FTP: Batch backup of FTP files..

1 post / 0 new
benzzon
benzzon's picture
BAT,FTP: Batch backup of FTP files..

BAT file:


@echo off
echo.
echo *** FTP Backup
echo.
ftp -n -s:ftp_script.ftp
rename backup\x.txt x_%date%.txt
rename backup\y.txt y_%date%.txt

 
FTP file (ftp_script):
 
!REM Script to backup files from ftp.site.com..
open ftp.site.com
user <username> <password>
binary
!REM *** file 1
get public_html/folder1/x.txt backup\x.txt
!REM *** file 2
get public_html/folder2/y.txt backup\y.txt
bye

-- To download multiple files/recursive directories, look at "wget" (gnu utility)