SSH Multi-File Transfer Procedure

ssh-multi-file-transferLike most Aspen districts, we have several external systems that we regularly need to send files to for various student information.  State reporting, messaging systems, assessment systems, and nutrition systems to name a few.  The standard way to accomplish this in Aspen is:

  1. Create a job that executes the export to generate the data file
  2. Create a job that executes the SSH File Transfer Procedure to send that file

While this works, often times you are exporting multiple files to the same site at roughly the same time, and it would be much easier to export all the files and then send them all together with a single transfer job. For example, if you are using a messaging system to send absence notifications, you might have all your elementary schools sending at 9:00 am. Scheduling an export job for each elementary and a single SSH file transfer would be easier.

Another situation we ran into was the submission of a variable named file. In Washington, we have a state data submission where the current date is part of the file name. In Follett’s default SSH File Transfer Procedure, you need to explicitly name the file, so it was not possible to build a recurring job to handle the daily changing file name.

To solve these issues, we created a new procedure called SSH Multi-File Transfer Procedure based on Follett’s SSH File Transfer Procedure, but enhanced it with the following features.

  • Added the ability to specify a comma-separated list of files to send (or receive though I did not test this).  Each file name can include wildcard characters supported in the Java environment.
  • Added a parameter to set the maximum number of transfer attempts for each file, defaulting to three attempts, the same as Follett’s version.
  • Added a parameter to set the number of seconds to wait between multiple transfer attempts, defaulting to three seconds, the same as Follett’s version.

We added the last two features related to multiple transfer attempts because we had some sites that appeared to have heavy use at certain times of the day and would not be able to respond within the default three attempts, and the job would fail.

You can download the bundle for the SSH Multi-File Transfer Procedure from the wiki. Here is the input definition for the procedure.  For those of you familiar with the standard SSH File Transfer Procedure, very little has changed.


As an example, if you wanted to send all the CSV files and a specific text file from one folder, enter the Local Folder Path as the folder containing the files and enter the Local Files as “*.csv,info.txt” (no quotes).

Another example is for our exports to Renaissance Learning. Instead of having nine export jobs and nine SSH File Transfer jobs, we now have nine export jobs and a single SSH Multi-file Transfer job.  Makes for a much cleaner job queue.

I hope you find this useful in your school or district!

Leave a Reply