H2H Automatic error folder synchronisation and scheduling

When uploading your EDI manifest via your SFTP client to our SFTP server, there is a chance a line in your CSV can contain an error. Please see our post on H2H CSV/EDI manifest format.

It’s the client’s responsibility to proactively check the ERR folder, however this tool will allow for automatic synchronisation to ease the manual duties when checking for any new files.

How can I setup this process? :gear:

By using a 3rd party tool called FreeFileSync you are able to mirror the ERR folder to a local or cloud folder storage of your choosing.

  1. You will need to input your SFTP credentials to connect via FreeFileSync.
    This can be done by clicking on the cloud icon, then you would select the SFTP option and enter your details as you would with any SFTP client.


  2. Next, under the directory on server section select “browse” and then select the ERR folder. This would be the source folder from which content is copied.

  3. Now you have set the source folder, the same needs to be done for the target folder which will be modified whenever there is a change from the source folder.
    To use a local folder on your hard disk please select the “browse” icon, alternatively you can click the “cloud” icon again to choose an online storage.

  4. Next, we’ll change the sync setting to mirror to only allow changes from the source to the target.
    To do this we we’ll select the green “cog” icon in the top right hand of the program.

  5. You can now test if the connection work as intended by firstly, clicking the compare button in the top left to check for any new files and then synchronise to mirror the source folder to the target folder.

How can I automate this process? :thought_balloon:

A wonderful feature of this software is the tool to create batch files to automatically run this configuration from a click of a button, this can be taken even further and can be scheduled to fully automate this process.

  1. To begin, select the “save as batch” icon in the top left of the program, I recommend leaving “run minimised” & “Auto-close” unchecked as this will provide a pop up box when the process begins for visibility. Note, you can tick the “auto-close” box if you would like the process to complete without a user input

With FreeFileSync, scheduling works on MacOS, Windows & Linux by using the system’s onboard scheduler.

- MacOS Automator & Calendar :apple: :technologist:

  1. Open Launchpad and run Automator
    image

  2. Create a new document - type must be Calendar Alarm
    image

  3. Drag and drop the newly created batch file from your “finder” to the workflow on the right-hand side and then drag & drop from File & FoldersOpen Finder Items and add it to the work flow

  4. Save the Automator job as appropriate

  5. You can now edit this calendar appointment to fit your own scheduling. Note, we recommend setting this schedule to run 20 minutes after your scheduled EDI uploads to allow the system time to create an error file if any.

- Windows Task Scheduler :window:

  1. Open the Task Scheduler either via the start menu, or enter taskschd.msc in the run dialog (keyboard shortcut: Windows + R).
  2. Create a new basic task and follow the wizard.
  3. Make Program/script point to the location of FreeFileSync.exe and insert the ffs_batch file into Add arguments.
  4. Use quotation marks to protect spaces in path names, e.g. “D:\Backup Projects.ffs_batch”
    image

- Ubuntu Linux Gnome Scheduled Tasks

  1. Install Gnome-schedule if necessary: sudo apt-get install gnome-schedule
  2. Search the Ubuntu Unity Dash for Scheduled tasks
  3. Enter the command: <FreeFileSync installation folder>/FreeFileSync <job name>.ffs_batch
  4. Select X application since FreeFileSync requires access to GUI
    image

Please see official guides from the software provider for more tutorials, tips & tricks:

Tips & tricks

Tutorials

Please note, if you require support for this 3rd party software, you should contact the provider directly .