Scratch that....I remembered an answer Ben Nadel game me a little while back:
http://www.bennadel.com/blog/553-Searching-Directories-And-File-Content

 ...sorry to jam up the questions.




> I'm looking to create a tree which will represent a file directory and 
> all its subfolders and subfiles. I have been able to get the first set 
> of subfolders to group and populate properly but the 3rd, 4th, etc 
> level folders do not. Any help figuring out how to populate the 
> subfolders would greatly appreciated. 
> 
> My invoke:
> 
> <CFINVOKE COMPONENT="Tree"
    
> METHOD="getlist"  
    
> path="#MyFilePath#"
    
> returnvariable="Folder1">
> 
> 
> My create tree:
> 
            
> <cftree name="tree1"
       
>                 required="yes"
              
> completepath="yes"
      
>                 hscroll="no">  
            
> <cftreeitem value="Type, Name"
                
> query="Folder1"
                
> queryasroot="Type"
                
> expand="yes"
                
> img="document,folder">
            
> </cftree>
> 
> My CFC function:
> 
    
> <cffunction name="getlist"
    
> returntype="query">
    
> 
    
> <cfargument name="path"
    
> required="yes"
    
> hint="this is the path of the folder">
    
> 
    
> <cfparam name="path" default="">
    
> 
    
> <!---RUN QUERIES--->
    
> <cfdirectory name="Folder1" directory="#path#" action="LIST">    
    
> <cfreturn Folder1>    
    
> </cffunction>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create Web Applications With ColdFusion MX7 & Flex 2. 
Build powerful, scalable RIAs. Free Trial
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJS 

Archive: 
http://www.houseoffusion.com/groups/CF-Newbie/message.cfm/messageid:2781
Subscription: http://www.houseoffusion.com/groups/CF-Newbie/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15
  • CFTree Nick G
    • Re: CFTree Nick G

Reply via email to