The FileSplitter executable can be found in the Utils sub-directory of the ODEX installation directory. This executable can be configured so that files from the Inland Revenue can be directed to different directories and/or given different filenames, based on either the Sender ID or Tax district/Empref code in the 4* header of an Inland Revenue GFF file.
When a file is processed by the FileSplitter it will be given the same filename it had when it was passed to it, plus a counter representing which 4* header in the original file is contained in the new split file (this always starts at 1), and prefixed with any value from the FILEMASK field specified in the FileSplitter.cfg, so TEST.EDI with two 4* headers will be split into TEST0001.EDI TEST0002.EDI
If the FileSplitter.cfg has been set-up, you are now ready to set up ODEX to pass received files to the FileSplitter.exe to be separated appropriately.
To do this, you will first need to create an 'Extract Non-EDI' event within ODEX, and set up a time profile or Event Manager event which will trigger the extraction event.
The 'Directory' field (in the File Details section of the Non-EDI File Extraction dialog) is the location in which the files are placed prior to being processed by the FileSplitter.
They will remain in this location once it has completed.
Within the 'Execute Application' field, enter the line below (including double quotes) -
"<path to the FileSplitter.exe >\FileSplitter.exe" $FILENAME
e.g. the path for ODEX installed in the default location would be -
"C:\Program Files\DIP\ODEX\UTILS\FileSplitter.exe" $FILENAME
(Please note that $FILENAME must be upper case).
Whenever this event is triggered, ODEX will call the FileSplitter and pass it each file which is extracted with the 'Extract Non-EDI' event.