There are several ways to accomplish this.

One of the easiest methods is to create an array(or query, whichever you
like) to hold all of the files you find as you recurse through the files.

Start by creating an array to hold just the directories you find and another
to hold the entire directory structure.

Add the top level directory to the dir array and then do a conditional loop
over that array as long as it has elements.

<cfloop condition="#ArrayLen(myArray)#">

Inside this loop do a cfdirectory using the first element in the array

Loop over it's results, adding all directories to the bottom of the dir
array and all files to the file array.

before the loop ends, delete the first element.

This will make the system continue to recurse through all of you directories
until it cannot find anymore. Then you have an array containing all of the
files and folders on your system.

I have an example somehwere I will try to dig up and I will send it to you.

HTH

=]

--
Alan Rother
Macromedia Certified Advanced ColdFusion MX 7 Developer


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:238019
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to