SFTP Using the Scheduler (Post Processing)

Cory Fifield -

Trouble viewing images? Click on images to enlarge.

 

In this article we look at using Post Processing commands to send the Scheduled Job's output file to an SFTP Server using an SFTP Client. Secure File Transfer Protocol (SFTP) is a protocol for transferring files over the internet. It builds on the File Transfer Protocol (FTP) and includes SSH security components. 

**Please note: we are using the WinSCP application as an example of how a file can be delivered via command line using an SFTP client.  We are not recommending WinSCP and do not offer support or guidance on WinSCP or any 3rd party application.  Please check with your system administrator if they have a preferred SFTP client, and before installing any application.

 

Steps to implement SFTP in Scheduler

 

1. Download WinSCP

 

2. Set up your site in WinSCP (Refer to WinSCP documentation for help)

 

3. Click Session and select Generate Session URL/Code

mceclip2.png

 

4. Click on the Script tab and make sure the Command-Line format is selected, then click Copy to Clipboard.

mceclip6.png

 

5. Go into the Job setup Wizard for Post Processing inside VDM's Scheduler, Enable Command Post Processing.  Next, paste your clipboard into the Text Editor. 

  • In front of the newly pasted text, add the path to the WinSCP application; the orange box indicates the directory path to the WinSCP executable.
  • Update the log argument to a valid directory on your workstation where the WinSCP.log file will be written; the purple box indicates the file path for where the log files will be written.
  • Using the Right Click context menu, update the first argument to reflect the VDM FullFilename, and then specify the SFTP Server's directory where the VDM output file will be transferred; the green box indicates your first argument. An example command can be found below.

 

Example Command:
""C:\Program Files (x86)\WinSCP\WinSCP.exe" /log="C:\temp\WinSCP.log" /ini=nul /command "open sftp://BridgeWorks:Ah7xp7Lk%5EK%80%24E8*K@secure.bridgeworksllc.com/ -hostkey=""ssh-rsa 1024 DbcU5fe3tX0h7/yb4mGeZzFk+Y/iUnr7/MtiapKu8V8="" -rawsettings ProxyPort=0" "put FR.PDF.FullName /MyUploads/" "exit""

 

**IMPORTANT NOTE: The entire command needs to be inside double quotes (" ")

mceclip3.png

**IMPORTANT NOTE: The entire command needs to be inside double quotes (" ")

 

When selecting what item you want exported from VDM, it is recommended to use the Right Click context menu to select it.

mceclip2.png

 

Click Finish to complete the setup and save your Job.

Have more questions? Submit a request

Comments