This didn't work for me. It took 32 s. to create a file and the returned files are in DOS like way (short names).
>>>The following example will put the list of files into the file "output.txt", which must then be analyzed.
>>>
>>>
>>>RUN DIR c:\MyFolder\*.* /B > output.txt
>>>
>>
>>I need the fastest and most reliable method, which would work correctly on a directory with more than 13K files.
>
>Well, then, see how fast it works, and compare it with the other methods.
>
>The part above should work without problems; to read in the file, you can use FileToStr() and alines() (if you expect less than 65,000 files), or FileToStr() and a combination of _mline and mline() (if you expect more than 65,000 files).
If it's not broken, fix it until it is.
My Blog