Step 12 – Advanced File Archiving
IMan provides sophisticated, almost transactional control of file operations. This step will show how to use the File Task to move only those files which have been processed.
SYS.INPUTFILE
On any File Reader (CSV, XML, Excel & Fixed Width Text), there is an additional field added to the dataset containing the full File Path of the File(s).
Actions the File task can do using the SYS.INPUTFILE field:
- Move the Orders file from the Archive directory to its parent directory.
- Open the Sage300 Order Import connector.
- Go to the fields mapping tab, and click the edit button.
- As per the discussion for Using the Log Key for Unmapped Fields
- Set the log key for the SYS.INPUTFILE to 20.
- Save the Grid and Close.
- Re-open the File Task.
- Clear the Source Directory field.
- Set the Source File to:
- %[OE0520.SYS.INPUTFILE]
The Field must be fully referenced to include both the Transaction Id as well as the field name.
- Press Refresh.
- The file will now be moved to the Archive directory.
- This has the same effect as the previous ‘simple’ example but in a high volume environment this will now only move files which have been processed, since only processed files can be referenced by this field.
- Press Apply to save and then close.
- Save the integration.
- Run the integration in total from the Scheduler.
- Just remember to move the file from the Archive folder back to the original folder first!