trim extension when using fso
Posted on 2004-09-29
I am using FSO to build a dynamic list/menu with the file name from my folder.
What I would like to do is display the file name without the extension in the list/menu.
A bit of what I am using:
<%For Each objFile In objFolder.Files
arr = split(objFile.Name, ".") 'split the name and the extension into an array
If (arr(UBound(arr)) = "wma") then
response.Write("<option value=""mms://myStreamURL.ath.cx" & objFile.Name & """>" & objFile.Name & "</option>")
Think this is an easy one, just lots of point cuz I'm lazy and in a hurry ;)