Assuming that the name of the first file is using yesterday's date and the name of the second file is using today's date, you can define the 2 jobs using the FileWatcher template as follows:
%%YESTERDAY=%%$CALCDATE %%$DATE -1
%%DD=%%SUBSTR %%YESTERDAY 7 2
%%MM="%%SUBSTR %%YESTERDAY 5 2
%%YYYY=%%SUBSTR %%YESTERDAY 1 4
%%DD=%%SUBSTR %%$DATE 7 2
%%MM=%%SUBSTR %%$DATE 5 2
%%YYYY=%%SUBSTR %%$DATE 1 4
Provide appropriate values to the other filewatcher's parameters.
Sorry it took so long for me to reply. To summarize, I was able to use your suggestions to setup variables for the date (current and previous day). However, another issue I wasn't aware of is that we may get multiple files per day, although we're supposed to get only one.
PhoneFile_101320150100.txt (received at 1am ET)
PhoneFile_101420150030.txt (received at 12:30am ET)
PhoneFile_101420151157.txt (this file is really the file for the 10/15/15, but it came a few minutes before midnight on 10/14).
...and this will change and is very sporadic. I didn't know this before.
So since I can't code for every possible scenario without a lot of complexity, I want to see if I can use the Minimal file age and Maximal file age parameters on the File Watcher attributes form. If File Watcher detects a file that is more than 24 hrs old, it ignores it and waits and continues detecting. If File Watcher finds a file that is less than 24 hrs old, then the File Watch job completes and allows its successor job to run. Does that make sense?
From reading the documentation the Minimal and Maximal file age parameters, they don't seem to work quite that way. Can anyone suggest what would work?
I need to understand your requirements. Do you mean that the phone job can be triggered as long as a new file that is less than 24 hours old arrives? If multiple files arrives on a single day, will they be processed immediately as well? Previously, it was based on 2 files being detected.