PeopleSoft

FindFiles function does not return a sorted array

I had a series of files with the following names:

JM001.pdf
JM002.pdf
JM003.pdf
..
JM100.pdf
JM101.pdf

One silly assumption that I made was that the FindFiles PeopleCode function returned a sorted array of strings. While this seemed to be the case on Windows environments, it was not the case on UNIX systems. Fortunately all I had to do was sort the array in ascending order after the call to FindFiles:

Leave a Reply

Your email address will not be published. Required fields are marked *

*