Jump to content
Sign in to follow this  
Tonych

File name sort problem

Recommended Posts

Tonych

Hi, everyone!

I have some files like these: 2, 4, 10, 12, 20, A2, A10, A20-1, A20-2...

In Windows explorer, it displays very well. When I try to read them in AutoIt ( use _FileListToArray or FileFindFirstFile), there is a problem that they are sorted like these: 10, 12, 2, 20, 4, A10, A2, A20-1, A20-2...

How can I get the same way like in Windows XP? Thanks in advance!

Share this post


Link to post
Share on other sites
ProgAndy

You should read the files to an array and use a natural sort algorithm, e.g.: http://www.autoitscript.com/forum/index.ph...hl=natural+sort


*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.