Thanks Ben and Greg.

I'm using the CFDirectory example on Macromedia's site. It lists the directory 
name and size of files found. 

One step further: How can I filter out any files (if #size# = 0 which means it 
is a directory name and not a file) and then insert the directory names in a 
table?

Robert O.

See code I'm using:

<cfdirectory 
   directory="#GetDirectoryFromPath(GetTemplatePath())#" 
   name="myDirectory">
   
<!---- Output the contents of the cfdirectory as a cftable -----> 
<cftable query="myDirectory" htmltable colheaders> 
   <cfcol 
      header="NAME:" 
      text="#Name#"> 
   <cfcol 
      header="SIZE:" 
      text="#Size#"> 
</cftable> 

-----Original Message-----
From: Greg Morphis [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 24, 2004 10:09 AM
To: CF-Talk
Subject: Re: get directory name


Use <cfdirectory>
Then 
<cfif dirlist.type eq "Dir">
...


On Wed, 24 Nov 2004 09:52:16 -0500, Robert Orlini <[EMAIL PROTECTED]> wrote:
> Using <CFFile> or another tag, is there a way to get the name of directories?
> 
> I have a folder with directory names I need to use in a drop-down list.
> 
> For example, in this directory: "d:\wwwroot\trials\science" the name I would 
> need to isolate would be "science".
> 
> Thanks.
> 
> Robert O.
> HWW
> 
> 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:185307
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=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to