|
-
Sort list of file names logically
Hi there,
I am near the point of breakdown trying to figure this out it's beyond my capabilities and maybe even brain power. I have a list of file names and I want to sort them as any logical human would.
728x250_expandable_frame1.jpg
to
728x250_expandable_frame15.jpg
At the moment when I use:-
Code:
files.sort(Array.CASEINSENSITIVE);
It assumes that frame4.jpg is greater than frame15.jpg so the order comes out:-
frame1, frame11, frame12, frame13
when obviously i want frame1, frame2, frame3
Any help would be greatly appreciated.
Will
P.s. I realised i could just name the files 01, 02, 03 but really I don't want to have to do this as it supposed to be an automated system.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|