Greetings!
I am using the following code to generate links to files on a website.
<%
Dim objFSO
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
'Get the folder object associated with the directory
Dim objFolder
Set objFolder = objFSO.GetFolder("C:\filepath\")
Response.Write "The files found in " & objFolder.Name & ":<br>"
'Loop through the Files collection
Dim objFile
For Each objFile in objFolder.Files
Response.Write "<a href='" & objFolder.Name & "/" & objFile.Name & "'>" & objFile.Name & "</a> <br>"
Next
'Clean up!
Set objFolder = Nothing
Set objFile = Nothing
Set objFSO = Nothing
%>
My question is how do I remove the file extension so that when the link outputs, the file extension is not there.
I have been trying iterations of getBaseName and cannot figure it out.
Any help would be great.