How to find the extension of a file name in coldfusion | coldfusion code to get file extension of filename

 We can use the following code to get the file extension of a filename provided. First get the file name to a variable, then using listlast ()  we can get the fille extension.


<cfset file = "test.png">

<cfset FileExt=ListLast(file,".")>

<cfoutput>#FileExt#</cfoutput>

Comments

Popular posts from this blog

how to add new line in google form questions | Fix for next line issue in google form questions

How to add new line in dropdown type question in google forms