You can also do Java's File Class, which returns an array.  I haven't 
done speed tests, but it *should* be faster for big directories:

    listDirectory = 
createObject("java","java.io.File").init("/var/absolute/directory/path").list();

Let us know if it's faster for you

Melissa Cope wrote:
>> The query you get from cfdirectory is an array (or rather, its columns 
>> are):
>>
>> <cfset randomFilename =
>> yourCFFileQuery["name"][randRange(1,yourCFFileQuery.recordCount)]>
>>     
>
> I can't believe I didn't thank of that! Thanks so much. 
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:309537
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to