The Windows Hot Folder Server
asperasync.exe does not have built in ability to archive files post transfer. For customers desiring this capability, it can be supplemented via a post processing script. What follows is one of many solutions to this.
The primary items of note:
- Solution uses a Windows batch file (
aspera-prepost.bat) to execute a Powershell script (
- The provided
aspera-prepost.batfilters off hot folder direction, success, transfer destination and username. These should be changed to suit the holt folder in question. In this case, the default destination filtered is the asperaweb user on demo.asperasoft.com.
- The Powershell script,
hf-archive.ps1, will place everything in a single folder (the
archive_base) but will organize by Hot Folder Name
Place these scripts in:
c:\Program Files (x86)\Aspera\Enterprise Server\var\
Once there, you will need to edit both scripts. In particular, you need to edit the following:
aspera-prepost.bat: Line 6: Chose a location to log to.
aspera-prepost.bat: Line 7: Chose a DESTINATION to check against
aspera-prepost.bat: Line 15: Chose a user that you transfer to for a destination.
These checks could be removed if the same host has hot folders to multiple hosts and users on those hosts.
hf-archive.ps1: Line 10: The archive_base is where files should backup to.
Run a test and see if this all works. You may need to run the following as an Admin the first time:
powershell Set-ExecutionPolicy Unrestricted
This will allow you to run Powershell. This is a good test in general, as it will let you know if the host you are on has Powershell. Windows 2008 should have it. If you don't you can get it free from Microsoft.