9

I'm trying to get my Continuous Integration system working from start to finish in the dev environment.

Unfortunately, the last step after publish is copying the folder to an offsite server which I can only access via FTP.

I'd like to have a service running that watches a local folder, and if it changes, updates the FTP server with those changes.

I can't seem to find something to accomplish this in Windows.

1

4 Answers 4

17

There is free open source WinSCP FTP client, which has all kinds of features for this.

The command you are looking for is in the "Commands" menu and is called "Keep remote directory up to date".

Keep Remote Directory up to Date Dialog


There is scripting support available as well via the keepuptodate command.

1
  • is there a way to manage all sync like this?
    – Ooker
    Mar 21, 2021 at 11:21
5

Try the freeware version of SyncBack. It doesn't do realtime folder monitoring, but you can schedule it to sync at specified intervals. Set it to something low like 1 minute.

2
  • I'd prefer realtime monitoring if I can find it. I could write it I suppose, I just have better things to do.
    – CaffGeek
    Sep 30, 2009 at 2:40
  • 1
    I've been looking for a project to get back into programming for a while. This sounds like a good fit. I've played with INotify and JNotify over the weekend and it's fairly trivial. You'll see some syncing software from me in the next few weeks :)
    – user1931
    Oct 22, 2009 at 20:09
2

Free and open source solution based on git:

Use git-ftp for synchronization. After installation and setting up a local git repository you can do:

  • git ftp init -u < user> -P f​tp://host.example.com/public_html #for pushing the first time
  • git ftp push --user < user> --passwd < password> f​tp://host.example.com/public_html

Now you just need to watch for filesystem changes, add them to your local git repository and push your repository using the above command.

Advantages:

  • git-ftp works on windows and linux (tested with mysys git on windows)
  • integrates nicely into your development setup if you're already using git
  • very easy to setup and use (if you're familiar with git)
  • incremental changes -> saves a lot of bandwidth

Disadvantages:

  • you need to find a solution to watch for filesystem changes (shouldn't be too hard to do, e.g. nodejs has solutions for this)

Here's an example for a batch file i'm using on windows:

@echo off
git init .
git add . --all
git commit -am "auto commit"
set /p pwd= Please enter ftp password: 
git ftp push --user myftpuser --passwd %pwd% ftp://myftphost.com/myfolder

Note that this is an interactive example, but you could make it noninteractive by storing the password in the batch file.

-1

Use boxftp!

It's free, open source, and works like a charm! It runs completely in the background and it can be configured to autostart.

It gives an experience exactly like dropbox; there's othing to micromanage, it just works.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .