Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ADIR() Mixed case please...
Message
From
01/11/2000 18:58:35
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00436894
Message ID:
00436964
Views:
15
>>>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.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform