Not to mention that storing both the full filename and the suffice in the
array value would force you to use a non-numeric sort anyway. A better
solution would be to use a struct, and then do
listSort(structKeyList(myStruct), "numeric") to pull them out in order.
Cheers,
barneyb
> -----Original Message-----
> From: Greg Luce [mailto:[EMAIL PROTECTED]
> Sent: Monday, June 28, 2004 11:19 AM
> To: CF-Talk
> Subject: RE: Ordering File Names
>
> Mikael,
> You could grab the value after the '-' and stick it in an array
> using the value as the key. Also put the full filename in the
> array. Then
> sort the array using arraysort().
>
> Greg
>
> -----Original Message-----
> From: Mickael [mailto:[EMAIL PROTECTED]
> Sent: Monday, June 28, 2004 2:07 PM
> To: CF-Talk
> Subject: Re: Ordering File Names
>
> I see, that is the only way to do it?
> ----- Original Message -----
> From: Burns, John D
> To: CF-Talk
> Sent: Monday, June 28, 2004 1:55 PM
> Subject: RE: Ordering File Names
>
>
> You need to make the numbers -01, -02 etc. File systems order
> alphabetically, not numerically. If you can't get the files in a
> different format, you may want to run some kind of script to rename
> everything to take the number between - and . And convert it to a 3
> digit number.
>
> John
>
> -----Original Message-----
> From: Mickael [mailto:[EMAIL PROTECTED]
> Sent: Monday, June 28, 2004 1:53 PM
> To: CF-Talk
> Subject: Ordering File Names
>
> Hi All,
>
> I need to display file names from my directory on a page. The file
> names are in the following format 1014133248-1.pdf,
> 1014133248-2.pdf,
> 1014133248-3.pdf etc
>
> I need to display them in order, this works fine for files
> up to -9 but
> after that I end up with
>
> 1014133248-1.pdf
> 1014133248-11.pdf
> 1014133248-12.pdf
>
> I am using CFDIRECTORY Then a Query of the output. Is
> there a way to
> order them properly?
>
> Thanks
>
> Mike
>
>
>
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

