>>>Hi,
>>>
>>>ADIR() returns an array with the files in a directory, but all the filenames are uppercase. Is it possible to get an list of the files in a directory as they are shown in windows explorer (MixedCase)????
>>>
>>>TIA
>>>
>>>Greetings,
>>Jean-Pierre,
>>
>>There are a couple of ways to do this. One way is my Windows Filenames programming that'll return a number of pieces of information regarding the file. It allows for wildcards and paths. The other way is to use the Windows Script Host.
oFSO = CREATEOBJECT('Scripting.FileSystemObject')
>>oFolder = oFSO.GetFolder("C:\My Documents")
>>FOR EACH oFile IN oFolder.Files
>> ? oFile.Name
>>NEXT
Unfortunately, the WSH does not allow for filtering the filenames. See the article's Ed Rauh and I have written in the VFUG newsletters (
www.vfug.org) beginning with this past September's issue for further information.
>
>Yes, ADIR supports FileMask, while WSH doesn't. Unfortunately, ADIR doesn't return filename in Mixed case :( It would be great, if functionality of ADIR (native VFP function) would be expanded. Also how does ADIR handle more than 65000 files in one directory?
The problem occurs long before 65000 files in a directory; the 17,001st entry creates an array with over 65000 elements and blows ADIR() out of the water.