Page tree

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


  1. Ensure JAVA JDK is installed on machine/server.

  2. Install Unanet Integrated Management Utility and download the sharefile.bat and sharefile.ps1 files from the Support site:

  3.  Configure the Unanet IMU Export - KC - IMU (Integration Management Utility).
    1. Ensure that any exported files are put into C:\unanet_imu\temp directory.

  4.  Configure ShareFile connection:

    1. Install Windows PowerShell 4.0:

    2. Install ShareFile PowerShell SDK 1.82 tool, which is a snap-in for Microsoft PowerShell that provides access to ShareFile’s API.

      Installer Link
    3. Create a directory called C:\unanet_imu\sftps_files.
    4. Create a directory called C:\unanet_imu\temp if one does not already exist.
    5. Open PowerShell and enter the following two commands (without the leading dashes):

      NOTE:  If you open PowerShell ISE, you can copy/paste the commands instead of typing:

      Add-PSSnapIn ShareFile

      New-SfClient -Name "C:\<any_directory_on_client>\sflogin.sfps"

      The second command will create a token file that’s used for authentication. Here it is named sflogin.sfps but it can be named anything you want.
      After you enter the second command, you will be prompted for SFTP credentials.

    6.  After the above step, your PowerShell screen should appear as follows and there should be a .sfps token in the directory you specified.

      Image Modified

    7. Ensure that the sharefile.bat and sharefile.ps1 files have been downloaded to the C:\unanet_imu directory (from Step 2):
      Image Removed
      Image Added

    8. Right-click sharefile.ps1 and edit in Notepad. Modify in the two places highlighted below:

      Image Modified

    9. Test by placing a file in the local files (C:\unanet_imu\temp) directory and running the sharefile.bat file from the regular command prompt.

    10. You should then see your files in the cloud

       Image Modified

  5. Create a Basic Task in Windows Task Scheduler to first run the IMU export, then run the ShareFile transfer as shown below:
    Image Removed
    Image Added

    EXAMPLE: Calling a .bat file from within the IMU.


                   <echo>Starting ShareFile .bat file</echo>

                   <exec executable="cmd"






                       <arg value="/c"/>

                       <arg value="sharefile.bat"/>

                       <arg value="-p"/>


                   <echo>Searching for Errors...</echo>

                   <if><resourcecontains resource="${run.log.dir}/run.log" substring="Timeout: killed the sub-process" casesensitive="true"/>


                                                 <fail>The pre-process timed out and was killed after ${pre-processing.timeout} milliseconds</fail>



                   <if><contains string="${sql.out}${sql.err}" substring="ERROR" casesensitive="true"/>


              <fail>Errors detected in the CSV Translation process.</fail>



              <echo>No errors detected.</echo>



                   <echo>Pre-processing return code: ${pre-processing.result}</echo>

                   <echo>CSV Translator complete</echo>