Sorry I was looking at something else. It is probably so simple but I just can't get it. Below is my code. How do I incorporate the directory structure listing?
<cfparam name="dir" default="d:\"> <cfset RecNo=0> <cfoutput query="dirlist"> <cfset RecNo=RecNo + 1> <cfset Session.stDirFileName[RecNo] = Name> </cfoutput> <cfoutput> <table border="0" cellpadding="0" cellspacing="0" width="100%" height="20"> <cfloop index="i" from="1" to=#RecNo#> <cfloop index="LineNo" from=#i# to=#i#> <cfif Session.stDirFileType[i] eq "File"> <tr height="20"> <td>#indent#</td> <td width="18" height="20"></td> <td valign="middle" width="100%" height="20"> <!--- [L:#LineNo#][R:#RecNo#] ---> <!--- Display file names ---> #Session.stDirFileName[i]# </td> </tr> </cfif> </cfloop> </cfloop> </table> </cfoutput> At 11:45 AM 5/15/2002 -0600, you wrote: >Where's the "x"? > >-Ben > >-----Original Message----- >From: phumes1 [mailto:[EMAIL PROTECTED]] >Sent: Wednesday, May 15, 2002 11:35 AM >To: CF-Talk >Subject: RE: Can this be done? > > >Would "x" be the line number? > >At 11:12 AM 5/15/2002 -0600, you wrote: > >You can reference the query by bracket syntax and do a nested loop as such: > > > ><!--- Query name = qResults ---> > > > ><cfset cols = 4> > ><cfset rows = Int(qResults.Recordcount/4)+1> > > > ><cfloop from="1" to="#rows#" index="i"> > > <tr> > > <cfloop from="1" to="#cols#" index="j"> > > <cfset currentIndex = i + ((j-1)*rows)> > > > > <cfif currentIndex gt qResults.Recordcount> > > <td> </td> > > <cfelse> > > <td>#qResults.fieldName[currentIndex]#</td> > > </cfif> > > </cfloop> > > </tr> > ></cfloop> > > > > > >NOTE, that code is not tested. It's just give you the idea/theory behind > >it. I hope that makes sense. > > > > > > > >Ben Johnson > >Hostworks, Inc. > > > > > > ______________________________________________________________________ Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists