Tried that also. I MUST be doing something wrong? Something is just not 
clicking.

Below is my code. Try it out.

<cfparam name="dir" default="d:\">

<cfform action="test2.cfm" method="GET" name="form1">

<cfoutput>
         <cfdirectory action="LIST" directory="#dir#" name="dirlist">
</cfoutput>

<cfif listlen(dir,"\") gt 1>
         <cfset updir = listdeleteat(dir,listlen(dir,"\"),"\") & "\">
</cfif>

<!--- Directory Listing --->
<cfoutput query="dirlist">
         <cfset dirCount = 0>
         <cfloop query="dirlist">
                 <cfif dirlist.type eq "dir"
                   and left(dirlist.name,1) neq "."
                   and dirlist.name is not "misc"
                   and dirlist.name is not "RECYCLER">
                   <cfset dirCount = dirCount + 1>
                 </cfif>
         </cfloop>

         <cfif type eq "dir">
                 <cfif left(name,1) neq ".">
                         <cfif dirlist.name is not "misc" and
                                   dirlist.name is not "RECYCLER">
                                         <cfif currentRow IS 1>
                                                 <cfset FolderImage = 
"images/plus_first.gif">
                                         <cfelse>
                                                 <cfif dirCount IS dirCount>
                                                         <cfset FolderImage 
= "images/plus_last.gif">
                                                 <cfelse>
                                                         <cfset FolderImage 
= "images/plus_notlast.gif">
                                                 </cfif>
                                         </cfif>


                                         <table border="0" cellpadding="0" 
cellspacing="0" width="100%" height="20">
                                                 <tr height="20">
                                                         <td>#indent#</td>
                                                         <td valign="top" 
width="17" height="20"><img valign="top" src="#FolderImage#" width="17" 
height="20" border="0"></td>
                                                         <td 
valign="bottom" width="16" height="13">
                                                         <img 
src="images/folder-closed.gif" border="0">&nbsp;</td>
                                                         <td 
valign="middle" width="100%" height="20">



         <cfloop index="i" from="1" to="#dirCount#">

                 [#i#]
         </cfloop>

                                                         <b>[#dircount#]</b><a 
href="#cgi.script_name#?dir=#URLEncodedFormat(dir)##URLEncodedFormat(name)#\" 
class="dirlinks" alt="#name#">#name#</a></td>
                                                 </tr>
                                         </table>
                         </cfif>

                 </cfif>

         </cfif>

</cfoutput>

</cfform>


At 08:56 AM 8/13/01 -0400, you wrote:
>After using ListLen to get the length of the list of directories, you
>should try using ListLast to get the last directory in your list.
>
>[EMAIL PROTECTED] put into words:
> >[snip]
> >
> >Note that the number of directories can change at any given time so hooking
> >of directory eight is not good enough.
>
>Judith Taylor
>ICQ: 67460562
>Freelance ColdFusion Developer - Athens, OH
>
>Friends don't let friends code before coffee.
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to