Built a simple backup script that can be run on Windows machines against remote machine via SCP.
1) Install WinSCP from http://winscp.net/. Make sure that the console interface tool is installed, and the install directory is part of your PATH. If the installer doesn't ask you about this, do it post-install from the advanced preferences panel.
2) log in to the remote machine and store the connection settings as <sessionname>
3) Write a little script like this:
option batch on option synchdelete on option exclude "*.dat" synchronize remote "c:\path\to\source\directory" "/path/to/remote/directory/" exit
and name it <scriptname>.txt
4) To invoke the script do this:
>winscp.com <sessionname> /script=<scriptname>.txt
Online docs are bad. For actual invocation run help on the installed version.
I wrote the above based on the documentation when I ran winscp.com /? and got this:
WinSCP, Version 4.0.5 (Build 354)
Copyright (c) 2000-2007 Martin Prikryl
Usage:
WinSCP session
WinSCP [(scp|sftp)://][user[:password]@]host[:port][/path/[file]]
WinSCP [session] [/console] [/script=file] [/command command1 command2 ...]
WinSCP [session] /synchronize [local_dir] [remote_dir] [/defaults]
WinSCP [session] /keepuptodate [local_dir] [remote_dir] [/defaults]
WinSCP /ini=<inifile> /log=<logfile> /privatekey=<keyfile>
WinSCP /update
WinSCP /help
session - Name of stored session or session information specified directly.
/console - Console (text) mode. Default mode, when invoked using WinSCP.com.
/script - Executes batch script file. If the script does not end with 'exit'
command, normal interactive mode follows.
/command - Execute list of script commands.
/synchronize - Synchronizes content of two directories.
/keepuptodate - Starts Keep remote directory up to date function.
/defaults - Starts operation without showing options dialog.
/ini - Path to configuration INI-file.
/log - Turns on logging to file.
/privatekey - Default private key file for authentication.
/update - Queries application homepage for updates.
/help - Prints this usage.
Of note is the version number. The commands available are quite different from those online.