Hi,

I'm displaying a treeview list of files on the server. Currently I'm displaying different graphics beside the filename based on the file extension.

Below I'm checked the first 4 characters from the right. I would say 98% of my files have a three character naming scheme to the right of the period.

Ex:

.txt
.xxx
.aaa

This is my problem. The other 2% of files have only 2 characters to the right of the period. How can I have the <cfswitch check for only "3" characters to the right and also "4" characters to the
right (see below code) at the same time?

.aa
.bb

I hope I'm making sense...

<cfswitch _expression_="#right(SESSION.stDirFileName[i],4)#">

        <cfcase value=".inc,.log" delimiters=",">
          <!--- CHECK FOR .INC OR .LOG EXTENSION --->
          <cfset icon_image = "images/file-ue.gif">
          <a href="" here...
        </cfcase>

        <cfdefaultcase>
          <cfset icon_image = "images/file-ue.gif">
          <a href="" here...
        </cfdefaultcase>

       <img src="" border="0">&nbsp;Filename here...</a>
</cfswitch>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to