I Have managed to put somethin together but I have one problem. It enables you to browse the folders but I have a problem opening the files cause it opens it from the "val" value instead of the url.
href values return the following:
Folder =
http://whatever/files.asp?drive=c:File = file:///c:\filename
I am not able to use the file.asp?drive=c:\ to open the file. I have tried using a URL= and replace that with the second link = val &S but then I have a problem with sub folders...
Any help would be appreciated....below the code:
*****************************
<%
'on error resume next
dim val
Dim FSO, f, f1, fc, s, fsub, link
val=request.querystring("drive")
if val="" then
val="C:\Inetpub\wwwroot\MSAP\"
else
if len(val)=1 then
val= val & ":\"
end if
end if
link=val
Set FSO = CreateObject("Scripting.FileSystemObject")
Set f = FSO.GetFolder(val)
Set fc = f.Files
Set fsub = f.SubFolders
%>
<html>
<head>
<style>
a {text-decoration:none;}
a:hover {text-decoration:underline;}
</style>
<meta http-equiv="Content-Language" content="pt-br">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>None</title>
<base target="_self">
</head>
<p style="margin-top: 0; margin-bottom: 0"><b>
File Names<%=val%></b>
</b></p>
<table border="0" width="50%" height="56">
<%
For Each f1 in fsub
s = s & f1.name
link=""
link = val & s&"\"
s = s & vbCrLf
%>
<tr>
<td width="100%" height="24"><img border="0" src="folder.gif" width="23" height="22" align="absmiddle">
<a href="files.asp?drive=<%= link %>"><%=s%></a></td>
</tr>
<%
s=""
Next
s=""
%>
<%
For Each f1 in fc
s = s & f1.name
link=""
link = val & s
s = s & vbCrLf
%>
<tr>
<td width="100%" height="24"><a href="<%= link %>" target="blank"><img border="0" src="file.gif" width="25" height="26" align="absmiddle"><%=s%></a></td>
</tr>
<%
s=""
Next
%>
</table>
<p></p>
</body>
</html>
*********************************
Such is Life!