I have a problem. I tried my best but could not solve is. I have a
page where user selects the folder name from a drop down list. It takes
user to show.asp page, where it how all the files in the folder and
also user can click on them and download them. If I select name of the
folder from the list, on show.asp it shows all the files and their
link. When I click on the link then most of the file which has long
name and have space in their names wont be hyper linked. For example if
files name is Virus Control.vsd or file name is INCIDENT-ACCIDENT
INVESTIGATION REPORT.htm. If I click on them it will say "The page
cannot be found". When I look in the address bar of the browser it
shows address "http://localhost/finalsite/pics//INCIDENT-ACCIDENT"
while it should be
"http://localhost/finalsite/pics/INCIDENT-ACCIDENT%20INVESTIGATION%20R..."
first page is a form where user select the name of the folder where he
wants to see the files.
Can you help me please
<%
' -- show.asp --
' Shows a list of uploaded files
Response.Buffer = True
%>
<html>
<head>
<title>List of uploaded Files</title>
<style>
body, input, td { font-family:verdana,arial; font-size:10pt; }
</style>
</head>
<body>
<p align="center">
<b>List of uploaded Files</b><br>
To upload files click
here </p>
<%
dim VirtualFolder
VirtualFolder = request.QueryString("foldername")
' File System Object
Dim fso
Set fso = Server.CreateObject("Scripting.FileSystemObject")
' "Uploaded" Folder
Dim folder
Set folder = fso.GetFolder(Server.MapPath(VirtualFolder))
If folder.Size > 0 Then
Response.Write "<ul>"
For Each file In folder.Files
Response.Write "<li type=""circle"">"
Response.Write "
"
Response.Write "<b>" & file.Name
Response.Write "</b> "
Response.Write "( Size: " & file.Size & " ) "
Next
Response.Write "</ul>"
Else
Response.Write "<ul><li type=""circle"">No Files Uploaded.</ul>"
End If
%>
</body>
</html>