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)?
Strange Wildcard selection behaviour
-
- 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
Could this be your reason?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.
Re: Strange Wildcard selection behaviour
... 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
hugh