Sign in to follow this  
Followers 0
Rivers

Directories out of order

2 posts in this topic

I'm sorry if I'm repeating an old topic.

I am providing a network path to FileFindFirstFile (with FileFindNextFile) or _FileListToArray. I need a filtered and sorted list of the directories in the provided path.

The list of directories returned is not in order. The directory names are "47100009", "47100010",...,"47100050". The first directory in the returned list is always "47100040" followed by "47100031" and then others in somewhat mixed up order.

Why are they out of order? They do not seem to be organized by date, size or name.

The FileFindFirstFile has an extremely useful filter, but I cannot find a way to sort the results.

With the directory list in an array I can sort it, but filtering the list has not been simple. I'm working through this solution - iterating through the list and skipping unwanted directories. Is there a way to filter the array directly?

Thank you,

Shawn Matlock

Share this post


Link to post
Share on other sites



I use this to filter my arrays with wildcards.


Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs, and the Universe
trying to produce bigger and better idiots.
So far, the Universe is winning.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0