Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adir function
Message
From
07/12/1998 07:35:55
 
 
To
07/12/1998 07:14:28
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00164664
Message ID:
00164668
Views:
26
>Hello:
>
>I'm trying to list everything in an array from a directory except
>.fpt files. I want to know if I can do this with the adir function or
>can I list everything and then delete all .fpt files and then redimension the array. Does anybody know how I can go about doing this? Any help would be greatly appreciated. Thanks


The quickest way to do this is probably to use ADIR() to populate an array, append it to a cursor, and then copy the content of the cursor back to an array, something like:
CREATE CURSOR Temp (fname C(100), fsiz I, fdate D, ftime c(8) fattr c(8))
=ADIR(aFileList,'C:\MyDirTOCheck\*.*')
APPEND FROM aFileList
DECLARE aFileList[1,5]
COPY TO ARRAY aFileList FOR ! '.FPT'$fname
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