The following code eliminates the periods in the directory listing plus, in 
this case, a file named "B77.TXT"
Hence this kind of logic can be changed to eliminate whatever files you 
don't want (like all TXT files if you use the RIGHT(NAME,3) NEQ "TXT"... 
etc...

<CFOUTPUT QUERY="SLC_DIR">
  <CFIF LEFT(#NAME#,1) NEQ "." AND #UCASE(NAME)# NEQ "B77.TXT">
    <CFSET mN_FILES = mN_FILES + 1>

    <CFSET F_2SEND[ArrayLen(F_2SEND)+1][1] = #UCase(NAME)#>
    <CFSET F_2SEND[ArrayLen(F_2SEND)][2]   = #SIZE#>

    <TR VALIGN=TOP>
      <td width=25% align="left"  ><font face="Arial" COLOR="#mF_COL1#" 
SIZE="2">
        <b>#UCase(Name)#</b> </td>
      <td width=25% align="center"><font face="Arial" COLOR="#mF_COL1#" 
SIZE="2">
        <b>#NumberFormat(SIZE,"999,999,999")#</b> </td>
      <td width=50% align="center"><font face="Arial" COLOR="#mF_COL1#" 
SIZE="2">
        <b>#DateFormat(DateLastModified)# 
#TimeFormat(DateLastModified)#</b></td>
    </tr>
  </CFIF>
</CFOUTPUT>

     ^
    / \__
   (    @\___
  /          O
 /    (_____/
/_____/
Whoof...
410-757-3487

-----Original Message-----
From:   Raymond B. [SMTP:[EMAIL PROTECTED]]
Sent:   Saturday, April 14, 2001 8:21 PM
To:     CF-Talk
Subject:        RE: cfdirectory

f you're displaying it alpha order (standard), then . and .. are always at
the top. CFDIRECTORY returns a query object, so just skip the first two
records using the startrow="" property.

-----Original Message-----
From: Joshua Tipton [mailto:[EMAIL PROTECTED]]
Sent: April 14, 2001 14:57
To: CF-Talk
Subject: cfdirectory


How can I keep the . and the .. from showing when I display the contents of
a directory?

Joshua Tipton
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to