Hello,
1. The order of results returned by GetFirstFile depends on the platform. You will find this information in the following Knowledge Base :
- "Order of Results Returned by GetFirstFile and GetNextFile Functions":
http://digital.ni.com/public.nsf/websearch/CCDF9D76E197272F86256F78000269E3?OpenDocument
2. Indeed, GetFirstFile() create a list of files matching to the criteria that is used by the GetNextFile() function.
3. As a consequence, if a file is deleted after the call to the GetFirstFile() function, GetNextFile() can give the name of a deleted file.
4. To avoid this issue, you can use the GetFileAttrs(...) function after each call to GetNextFile(). This function will return -1 if the file no more exists.
Best regards.
Benjamin
NI France