Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Question on ADIR() and ASORT()
Message
 
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01362370
Message ID:
01362381
Views:
22
This message has been marked as the solution to the initial question of the thread.
You sorted it on the fifth column, which is a file attributes. To sort on the first column ( a file name), ommit the second parameter all together
ASORT(aInputFiles)
>
>I made a big mistake an application I wrote about a year ago that just came back to hunt me. Here is what I did:
>
>I retrieved all files from a certain folder into an array and then I wanted to sort the array on the file name.
>
>
>nFiles = ADIR( aInputFiles, "*.TXT" )
>asort( aInputFiles, 5)
>
>
>Obviously (it looks to me) that the line ASORT( aInputFiles, 5) is wrong. My question is, what is the actual order of elements of array aInputFiles I get with my syntax? What would be the right syntax of the ASORT to sort the array on file name?
>
>Thank you in advance.
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform