Instead of using find("."), I'd use <cfif yesfile.type is "file"> --
it doesn't happen often, but it is possible to have a file without a
dot in the file name... the windows hosts file for instance. Odds are
you'll never run into it, but imho better safe than sorry...

> This is perfect!

> Thanks!
> Russell
>   ----- Original Message -----
>   From: Joe Kelly
>   To: [EMAIL PROTECTED]
>   Sent: Friday, December 26, 2003 8:31 PM
>   Subject: Re: Folder Names


>   This gets rid of everything but the directories:

>   <cfdirectory action="LIST"
>   directory="C:/CFusionMX\wwwroot\" name="yesfile">

>   <cfloop query="yesfile">
>       <cfif NOT Find(".", yesfile.name )>
>           <cfoutput>#name#<br></cfoutput>
>       </cfif>
>   </cfloop>

>   Thanks,
>   Joe Kelly
>     ----- Original Message -----
>     From: Joe Kelly
>     To: [EMAIL PROTECTED]
>     Sent: Friday, December 26, 2003 7:59 PM
>     Subject: Re: Folder Names


>     Hey Russell,

>     You might be getting "type" mixed up with "filter"
>     attribute.

>     <cfdirectory action="LIST"
>     directory="C:/CFusionMX\wwwroot\">
>     returns all the directories and files in that
>     directory.

>     If you use the filter,
>     <cfdirectory action="LIST"
>     directory="C:/CFusionMX\wwwroot\" filter="*.cfm">
>     will return just your ColdFusion files.

>     I don't know about a filter just for directories.  You
>     might have to call the whole directory and write some
>     code to just keep just the directories.  But this may
>     be what you're asking...

>     Thanks,
>     Joe Kelly
>       ----- Original Message -----
>       From: Russell Patterson
>       To: [EMAIL PROTECTED]
>       Sent: Friday, December 26, 2003 6:46 PM
>       Subject: Folder Names


>       Hello,

>       Hope all had a good Christmas.  I did.

>       I have searched everywhere and cant seem to find
>       what I am looking for.

>       I need to see how I can use ColdFusion to give me a
>       list of folder names in a given directory.  I
>       thought you could do it with <CFDIRECTORY> -
>       according to the Macromedia Developing ColdFusion MX
>       Applications book that came with the server
>       software, there is an attribute called type where
>       you can specify file or folder.  I think it is a
>       typo.

>       Do you know of another way to do it?

>       Thanks!
>       Russell


s. isaac dealey                214-823-9345

team macromedia volunteer      http://www.macromedia.com/go/team

chief architect, tapestry cms  http://products.turnkey.to

onTap is open source           http://www.turnkey.to/ontap


-----------------------------------------------
To post, send email to [EMAIL PROTECTED]
To unsubscribe: 
   Send UNSUBSCRIBE to [EMAIL PROTECTED]
To subscribe / unsubscribe: http://www.dfwcfug.org

Reply via email to