T
Ted Dawson
I have a page that writes a hyperlink to files in a folder, but the
hyperlink fails with the space in the filename. How can I strip out that
space or replace with ?
<%Dim objFSO
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Dim objFolder
Set objFolder = objFSO.GetFolder("C:\files\")
Response.Write "The files found in " & objFolder.Name & ":<br>"
Dim objFile
For Each objFile in objFolder.Files
Response.Write "<a href=http://www.yahoo.com/files/"
Response.Write objFile.Name
Response.Write " target=_blank"
Response.Write ">"
Response.Write objFile.Name
Response.Write "</a><br>"
Next
Set objFolder = Nothing
Set objFile = Nothing
Set objFSO = Nothing
%>
hyperlink fails with the space in the filename. How can I strip out that
space or replace with ?
<%Dim objFSO
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Dim objFolder
Set objFolder = objFSO.GetFolder("C:\files\")
Response.Write "The files found in " & objFolder.Name & ":<br>"
Dim objFile
For Each objFile in objFolder.Files
Response.Write "<a href=http://www.yahoo.com/files/"
Response.Write objFile.Name
Response.Write " target=_blank"
Response.Write ">"
Response.Write objFile.Name
Response.Write "</a><br>"
Next
Set objFolder = Nothing
Set objFile = Nothing
Set objFSO = Nothing
%>