Tonych Posted February 15, 2009 Posted February 15, 2009 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!
ProgAndy Posted February 15, 2009 Posted February 15, 2009 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
Tonych Posted February 15, 2009 Author Posted February 15, 2009 Thanks a lot to ProgAndy! I solve it.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now