Call now to talk to an automation expert — (512) 345-2211

Script Library

Sample scripts are provided as-is with no warranty of fitness for a particular purpose. These scripts are solely intended to demonstrate techniques for accomplishing common tasks. Additional script logic and error-handling may need to be added to achieve the desired results in your specific environment.



JPMorgan Chase supports numerous automated banking applications (Lockbox, PositivePay, ACH, etc.) over the internet.

Robo-FTP provides all the functionality needed to securely automate the process of uploading and downloading files with JPMorgan Chase.

Their requirements include:

  • A secure file transfer protocol such as FTPs, sFTP, or HTTPs (all supported by Robo-FTP)
  • A file encryption method such as PGP (supported by Robo-FTP)

This sample script will use sFTP, although you could use FTPs or HTTPs if you prefer.

JPMorgan Chase will provide the information you need to get connected and to encrypt files for uploading:

  • The URL for their sFTP server
  • The user name they have assigned to you
  • Their PGP public key (usually sent as a file attachment)

Once you have this information you can configure Robo-FTP. Here is a short summary of the steps you will need to complete in the Robo-FTP Configurator:

  1. Create an SSH key pair for authenticating to the sFTP server. This is done from the Configure SSH tab. The default settings are fine. Name the key file anything convenient (JPMorganChaseSSHKey is fine, for example).
  2. Email the public part of the SSH key to JPMorganChase. If you used the naming example given above, the public key will be named JPMorganChaseSSHKey.ssh2.
  3. If you plan to download files from JPMorgan Chase, create a PGP key pair from the Configure PGP tab. The default settings are fine.
  4. If you created a key pair in the preceding step, export the public part of that key and email it to JPMorgan Chase. You can export your public key by clicking the Manage Keys button in the Configure PGP tab.
  5. If you plan to upload files to JPMorgan Chase, you need to import their public key. You can import a public key by clicking the Manage Keys button in the Configure PGP tab.

The sample script below demonstrates how easy it is to communicate with JPMorgan Chase's sFTP server with Robo-FTP. This sample script logs on, encrypts and uploads any files to the incoming directory, then downloads and decrypts any files waiting for you in the outgoing directory.

PGP Hints

  1. Some programs require a digital signature without encryption, in this situation your script should use the PGPSIGN command instead of PGPENCRYPT.
  2. PGP keys generated by Robo-FTP 3.9.7 and earlier always contain a signing key that is one half the size of the encryption key. Therefore, if your program requires a 2048 bit signing key you should generate a 4096 bit RSA key in the Configurator. Beginning with version 3.9.8 both keys are the same size with the notable exception that DSA does not support signing keys over 2048 bits.

  1  ftplogon "url given by JPMC" /user=YourUserName /servertype=SFTP /keyauth /trust=all
  2  ;; Encrypt and upload files
  3  ftpcd "incoming"
  4  workingdir "c:\JPMC\uploads"
  5  :upload_loop
  6  getnextfile "*" /oldest

  7  IFERROR= $ERROR_NO_FILE_FOUND goto download_files
  8  set encrypted_file = %nextfile + ".pgp"
  9  PGPENCRYPT %nextfile encrypted_file /encryptfor="JPMC" /compat
 10  sendfile encrypted_file /delete

 11  delete %nextfile
 12  goto upload_loop
 13  :download_files
 14  ;; Download and decrypt files
 15  ftpcd "../outgoing"
 16  workingdir "c:\JPMC\downloads"
 17  getsitefile "*" /oldest

 19  rcvfile %sitefile /delete

 20  set decrypted_file = %sitefile
 21  setright ext = decrypted_file 4 /split

 22  pgpdecrypt %sitefile decrypted_file
 23  delete %sitefile
 24  :done
 26  exit

Browse complete list of scripts

Need help figuring out where to start?

Our sales staff is available to answer product questions and help you determine if Robo-FTP is a good match for your project.

Call Now: (512) 345-2211