The examples tell you just to loop over the query returned by cfdirectory but it is much faster to do a subquery and use it instead.
<cfdirectory action="list" directory="C:\" name="treebase" recurse="yes">
<cfquery dbtype="query" name="treebaseFiltered">
SELECT Name, Directory
FROM treebase
WHERE Type = 'Dir'
</cfquery>