Strange Wildcard selection behaviour

Post Reply
hbell
Posts: 61
Joined: Wed Feb 25, 2009 6:15 pm
Version: 9.1 SP3
Excel Version: 11.8

Strange Wildcard selection behaviour

Post 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)?
jstrygner
MVP
Posts: 195
Joined: Wed Jul 22, 2009 10:35 pm
OLAP Product: TM1
Version: 9.5.2 FP3
Excel Version: 2010

Re: Strange Wildcard selection behaviour

Post 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?
hbell
Posts: 61
Joined: Wed Feb 25, 2009 6:15 pm
Version: 9.1 SP3
Excel Version: 11.8

Re: Strange Wildcard selection behaviour

Post 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
Post Reply