1 of 1 people found this helpful
What you may try doing is:
1. Create a global variable
2. In the job scheduling section go to More->Run Pre-Command and set the Global variable's value to the file you want to transfer using CTMVAR utility. Because your file names are following a standard and are always in incrementing sequence you should be able to construct your file name using control-m variables.
3. Now Create the AFT job to transfer the file. Here give the directory name along with the Global variable. Which will make the full path of your file along with the file name.
4. Once the file is transferred run the post command to set the global variable's value to GobalVariable+1. You may use Control-M system variables for addition.
5. Run this file transfer job every minute.
6. It will always transfer the file in sorted order based on your filename.
I do not have environment to test it. So please test and let me know if there is any issue.
It turns out that the AFT will process the files in the name sequence (which is exactly what I want), i.e. if you do a 'dir' command then the AFT will process the files in the order as shown on the screen.
I am saving the downloaded file name as an Autoedit variable and it turns out that the user wants the process paused while it is being processed on the remote server. Therefore I set up a file watcher to see when the file has gone from the "receiving" folder on the remote server (using the file name saved as the variable).
So it's a simple solution but very effective!
Thanks & Regards,