Pergunta

O que é o melhor cliente de SFTP scripts livre para windows?

Eu olhei WinSCP e FileZilla. WinSCP parece bastante de buggy (clique aqui) e FileZilla não parece muito programável.

Todas as sugestões?

Basicamente o que eu quero fazer é:. A partir de uma tarefa agendada, registro em um servidor remoto, retire todos os arquivos de diâmetro, e excluí-los do servidor remoto

Foi útil?

Solução

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.

Outras dicas

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

Putty scp has already been mentioned.

I want to mention putty psftp.exe which might be new.

Use the following command line:

psftp.exe -l -pw -b

This will log into the ftp server and run file-with-ftp-cmds against it.

Full docs here:

http://the.earth.li/~sgtatham/putty/0.52/htmldoc/Chapter6.html

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

I know this is a very old question, but take a look at http://redpark.posterous.com/lftp-for-windows

From cygwin I am using only 3 files: bash.exe, ssh.exe and cygssp-0.dll. Put them in the same directory as redpark's Windows port of lftp and go scripting.

Commandline example:

D:\lftp>bash
bash-4.1# export PATH=.
bash-4.1# lftp sftp://user:pass@somehost.com
lftp user@somehost.com:~> put -c cx160sd.flv
194749860 bytes transferred in 112 seconds (1.67M/s)
lftp user@somehost.com:/> exit
bash-4.1# exit
exit

D:\lftp>

It is no single exe solution, but uploads proved to be twice as fast as uploads by pscp.exe

Edit: new URL now posterious has stopped: http://envelopepushing.wordpress.com/2010/08/24/lftp-for-windows/

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

Note to others: To create the scheduled task, simply open a text editor and write out the pscp command. Then save the file as a .bat file. Chapter 5 and 6 of the documentation have everything you'd ever want to know about how pscp works.

Note that pscp is quite particular about having a source and a target. If you don't provide those, pscp will simply default back to the usage message.

Here's an example:

c:\pscp.exe -pw [your password] -batch -sftp someuser@example.com:/* c:\yourlocation

In this example pscp.exe is sitting in the root of th c directory. -batch disables interactive prompts so that they won't interrupt the automated task. -sftp forces the sftp protocol, because in the question sftp is specified. The :/* wildcard will bring back everything in the source, and the c:\yourlocation specifies where it ends up on your machine.

To schedule this as an automated task, simply bring up Scheduled Tasks. In XP, this is in System Tools. Then point the task to the .bat file you've created, give it a time to run, and you're set.

Rush FTP; free, comes in portable versions and has a comprehensive scripting API (compatible with LUA language).

If you work with powershell you can use something like netcmdlets (www.netcmdlets.com). It is not a client per-se, but a set of libraries (cmdlets) for internet communications. There is a free personal edition as well. It's easy to configure schedules tasks to call powershell script and you have the benefit of being completely flexible/extensible through code.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top