tags:

views:

1020

answers:

4

What's the best free scriptable SFTP client for windows?

I've looked at WinSCP and Filezilla. Winscp seems quite buggy (click here), and filezilla doesn't seem very scriptable.

Any suggestions?

Basically what i want to do is: from a scheduled task, log onto a remote server, pull any files across, and then delete them from the remote server.

+2  A: 

Cygwin. You can combine the power of command line sftp with the power of BASH scripting. All that, in Windows!

Pablo Santa Cruz
Cygwin is a pretty heavy install, isn't it? I was hoping for a one-exe solution, kinda like winscp portable exe. It would help smooth things over with the infra guys.
Chris
Yes. It's a heavy install indeed. I have solved basic scripting issues with WinSCP. But I don't know if it will be useful for very complex scripts. Haven't tried it.
Pablo Santa Cruz
A: 

You could check out SecureFX by VanDyke. http://www.vandyke.com/products/securefx/

or MKS Toolkit for Sys Admins http://mkstoolkit.com/products/tk/ds_tkother.asp

Joe K
They both look good, albiet not free...
Chris
+2  A: 

You can use the scp client that comes with putty pscp. You can use pscp on the command line like scp in a linux command line.

Janusz
I just spent half an hour giving that a go. Got stuck on the prompt for the key fingerprint, couldn't find any way to make that prompt disappear in script.
Chris
that prompt should only appear the first time you connect to this machine
Janusz
Actually, i got around that by piping in a one-line text file with 'n' as the only contents. It all works!
Chris
Note to others: I actually ended up using putty's PSFTP instead of PSCP.
Chris
A: 

Not free, but look at edtFTPnet/PRO for a comprehensive script engine that supports SFTP on Windows.

Here's a sample script:

# Sample SFTP script 
set remotehost=edtmobile
set user=javaftp
set password=javaftp
set protocol=sftp
set localdir=D:\work\tmp

# connect to the server
open

# change dir
cd remote/test

# put the local file test.txt to the server as mytest.txt
put test.txt mytest.txt

# disconnect
close
Bruce Blackshaw