SFTP (Secure Shell File Transfer Protocol)

If you are using Windows, download and install PuTTY(Full Installation) which includes an executable called psftp.exe.

Within Progress/OpenEdge shell out to the OS using OS-command statement.

Build a batch script file (see PuTTY instructions)

Code:
psftp.exe -bc -v -l <USERNAME> -ps <PASSWORD> -batch -b <FTPSCRIPTFILE> <SFTPSERVER>
Code:
PuTTY Secure File Transfer (SFTP) client
Release 0.60
Usage: psftp [options] [user@]host
Options:
  -V        print version information and exit
  -pgpfp    print PGP key fingerprints and exit
  -b file   use specified batchfile
  -bc       output batchfile commands
  -be       don't stop batchfile processing if errors
  -v        show verbose messages
  -load sessname  Load settings from saved session
  -l user   connect with specified username
  -P port   connect to specified port
  -pw passw login with specified password
  -1 -2     force use of particular SSH protocol version
  -4 -6     force use of IPv4 or IPv6
  -C        enable compression
  -i key    private key file for authentication
  -noagent  disable use of Pageant
  -agent    enable use of Pageant
  -batch    disable all interactive prompts
Hope this helps.

If the client machine is Linux talking to Linux. Have a look a rsync.
 
Many thanks for your reply!! That's indeed the way that you need when you works with SFTP.

I found yesterday another way to do it.

The program that we need is WinSCP.

You can use also commands to call the program.

Example:

Code:
"C:\Program Files\WinSCP\WinSCP.exe" /command "open <user>:<password>@<host>:<port>" "put <filepad/file on localhost> <dir on server>" "exit"

More info:
http://winscp.net/eng/docs/scripting

The program can you find here on http://winscp.net/eng/download.php

WinSCP exe:
http://winscp.net/download/winscp418setup.exe
 
Back
Top