Batch SFTP
If you have a bunch of files on Windows that need to be moved over sftp regularly there are many hurdles. In the world of Linux it would be a one liner, and even in Windows it "can" be. Let me show you how:
First get the WinSCP standalone application here: http://winscp.net/eng/download.php
Execute the standalone app to get the key saved into the ini of the program (this must happen once so that further command line calls to the same server won't fail)
Create a .txt file to provide WinSCP settings contents:
option batch on
option confirm off
open username:password@server.com
cd /HOME/location/
put c:\temp\*.*
close
exit
Create a .bat batch file to provide the windows scripting:
winscp403.exe /console /script=settings.txt
if errorlevel 1 goto error
echo Upload succeeded, moving local files
move c:\temp\*.* c:\uploaded
exit
:error
echo Upload failed, keeping local files
And that's it, double click your .bat file, or execute it programmatically. WinSCP is a great tool when linux isn't an option.