If the order of the files when retrieved from the FTP server aren't in the order that you want, then some extra work will be needed to put them in the order you need. Currently, there is no built in way to sort a file list... but this functionality is on the road map for a future release of GoAnywhere Director. In the meantime you will have to follow this basic outline on how to pull it off.
- create your file list
- write the file list values to a temporary database(file name, full path)
- retrieve the values from the temporary database (order by file name)
- process the resulting rowset as needed.
Now in order to trim the prefix off of the file name as your are moving it to it's new destination, there are a few ways to accomplish this.
1) As you process each row, you can use the substring function against the file name to retrieve the file name without the prefix.
2) Alternatively, prior to processing rowset, you can use the Modify Rowset task (requires version 4.6.0 or later) to build an updated rowset that contains the existing values and an output file name exactly how you want them to be. Then from there, you can process the resulting output rowset.