Page 1 of 1

Strange Wildcard selection behaviour

Posted: Wed Aug 31, 2011 1:18 pm
by hbell
Here is a directory of all files with the pattern "tbess*.txt" within this given directory

Directory of I:\Admin Files\Users\David\LedgerData

08/31/2011 01:26 PM 288,329,844 TBESS_22024982_30-AUG-11.txt
08/30/2011 10:52 AM 288,095,855 TBESS_22022075_29-AUG-11.txt
07/29/2011 02:17 PM 286,160,593 TBESS_21575627_28-JUL-11.txt
08/01/2011 11:18 AM 286,736,948 TBESS_21648448_31-JUL-11.txt
08/30/2011 10:52 AM 288,095,855 TBESS_21992074_29-AUG-11.txt

Running this TI process:

Previousfile = 'TBESS_21648448_31-JUL-11.txt' ;
FileName = WildcardFileSearch( '\\emc-nas6.ipc.us.aexp.com\285831_E301\TM1\Admin Files\Users\David\LedgerData\TBESS*.txt',PreviousFile) ;
asciioutput('\\emc-nas6.ipc.us.aexp.com\285831_E301\TM1\Admin Files\Users\David\LedgerData\delme.txt',filename,previousfile);

Gives this result:"TBESS_21992074_29-AUG-11.txt","TBESS_21648448_31-JUL-11.txt"

However, running exactly the same process with the PreviousFile variable set to "TBESS_21992074_29-AUG-11.txt"
...gives this result:"","TBESS_21992074_29-AUG-11.txt". I.E. it does not find "TBESS_22022075_29-AUG-11.txt"

What am I missing (apart from a few braincells)?

Re: Strange Wildcard selection behaviour

Posted: Wed Aug 31, 2011 1:41 pm
by jstrygner
TM1 Reference guide wrote:The results of the WildCardFileSearch function may vary depending on the operating system in use. Files in a Windows directory are sorted in alphabetical order while files in a UNIX® directory are sorted in random order. Because the order of sorting varies between the operating systems, the identical WildCardFileSearch function executed against identical directories, one on Windows and one on UNIX®, will yield different results.
Could this be your reason?

Re: Strange Wildcard selection behaviour

Posted: Wed Aug 31, 2011 2:02 pm
by hbell
... thanks for the quick response. I should have added that we are running on Windows. So I would expect an ascending alphanum sort (and it worked this way for the first 6 iterations of the process).

hugh