Can any one suggest me how to start working in SFTP?(Any books/web sites)

I have to create a batch program to pull a file from a url using SFTP in windows.

I have no idea about SFTP.

A batch program which pulls the file from a url using FTP is already existing.

PLease find below for the commands used in the above existing batch program.

set PgpID=gecorpcard
set FtpID=ftp.corpcard.com
set FtpUser=xxxxxxx
set FtpPswd=xxxxxxx
set FtpMethod=binary
set FtpGetUser=xxxxxxx
set FtpGetUserPswd=xxxxxxx
set PgpKeyID=0x29A6A1F6 

Here the server name is psftppgp201.It means the file has to be uploaded into the server from the third party url.

  • are you sure you need SFTP? or just a secure ftp client, sftp is a wrapper for SSH filer transfers Aug 17, 2010 at 10:14

6 Answers 6


Look at the Putty package, i am pretty sure there is a CLI sftp included in it that can be scripted.

  • 1
    It's the PSFTP package
    – mfinni
    Aug 17, 2010 at 10:27

Another SFTP and FTP client is WinSCP.


You are asking for SFTP advice, but rest of your question is about FTP. SFTP and FTP are completely different protocols.


  • FTP is old, plain file transfer protocol. Passwords are sent unencrypted
  • FTPS (or FTP/SSL) is same FTP protocol run over TLS/SSL encrypted communication channel
  • SFTP stands for SSH File Transfer Protocol - a completely different beast. You can run SSH Shell or SCP over the same connection.

For details see http://www.rebex.net/kb/secure-ftp.aspx

FTP, FTP/SSL and SFTP clients for windows: I would try either Filezilla or WinScp. Both are multiplatform and work fine on Windows.


I use cygwin for that. Includes a command line SSH / SFTP, etc.


Another option to consider is Syncplify.me FTP Script... similarly to batch scripts (and psftp for example) it allows the execution of scripts to transfer files to/from FTP(S) and SFTP servers, but instead of dealing with DOS-style batch commands, it supports 4 modern object-oriented programming languages.

More information here: http://www.syncplify.me/products/ftp-script/


On Windows 10 there is a OpenSSH Client feature you can install

To enable/install the client:

Add-WindowsCapability -Online -Name OpenSSH.Client~~~~

After the client is enabled you can use this one line commands in PowerShell.

If you do not have set up key based access each command will ask for the password.

To get a file from remote location:

echo "get /C:/remote-server-dir/remote-server-file C:\local-dir" | sftp user@hostName

To send a file to a remote location:

echo "put C:\local-dir\local-file /C:/remote-server-dir " | sftp user@hostName

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy