• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 389
  • Last Modified:

cfdirectory - display filename without the extension

I am using cfdirectory to display filenames in a directory with hyperlinks to the files.  I would like to have it display without the fileaname extension.  Suggestions?

<cfoutput query="getLinks">
  <a href="../documents/#passname#/#getLinks.Name#" target="_blank">#getLinks.Name#</a><br>
0
dmwelter
Asked:
dmwelter
  • 3
  • 2
1 Solution
 
pinaldaveCommented:
<cfoutput query="getLinks">
  <a href="../documents/#passname#/#getLinks.Name#" target="_blank">#listfirst(getLinks.Name,'.')#</a><br>
0
 
mosphatCommented:
Use #listFirst(getLinks.Name)#

Note that it only works with filenames that have no dots in it (besides the one between name and extension of course)
0
 
mosphatCommented:
Sorry, that should read #listFirst(getLinks.Name, ".")#
0
How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

 
mosphatCommented:
Hmm, pinaldave was a split second faster... ;)
0
 
dmwelterAuthor Commented:
Thanks!
0
 
pinaldaveCommented:
Glad to help you:)
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now