Julia
Julia аватар
User offline. Last seen 5 недель 2 дня ago. Не в сети
Зарегистрирован(а): 07/06/2007

Backup to FTP Server with this free script

ftp-backupThere are many great FTP Client Freewares like Filezilla but uploading the same folders again and again is a pain in a hass. So this little Script is a real time-saver as it will allow you to automate your backup or upload to FTP Server. I didn’t have to invent it as it’s the same copy-dir script that exists on Rebol Cookbook with a verbose refinement: I just tested that it really works with FTP :). So here it is:


ftp-backup: func [local-folder ftp-folder /verbose /local i] [

    i: 0
    if not exists? ftp-folder [
      make-dir/deep ftp-folder
        either verbose [
          print form [ftp-folder "folder created ..."]
        ][
          print i
        ]
    ]
    foreach file read local-folder [
        i: i + 1
        either find file "/" [
            ftp-backup local-folder/:file ftp-folder/:file
        ][
            either verbose [
              print file
            ][
              print i
            ]
            write/binary ftp-folder/:file read/binary local-folder/:file
        ]
    ]
]

To use it for example on Dreamhost FTP Server for example, type:


ftp-copy %"/c/install/wordpress/" ftp://ftpuser:ftppassword@maindomain.com/reboltutorial.com/

Note: to have ftp-backup available at startup, store it in user.r.

<!-- Social Bookmarks BEGIN -->

<!-- Social Bookmarks END -->

 

Я вас отвезу туда Вы

Я вас отвезу туда Вы согласны, сестрица

Отправить комментарий

Содержание этого поля является приватным и не предназначено к показу.

Подробнее о форматировании

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image. Ignore spaces and be careful about upper and lower case.