Features similar to the IIS browsing

Source: Internet
Author: User
IIS <!---Save this file as a folder_list.asp look at the effect of the added permissions can be convenient for yourself,--->
<%
' Const_domain_name for the domain name and don't put the slash in the end
Const Const_domain_name= "http://localhost"
%>
<style>
B,img,a{font-size:9pt;line-height:150%;text-decoration:none;color: #0000cc;}
span{font-size:12pt;}
</style>

<%
'------------------------------------------------display subdirectories and files under the current directory
Sub List
Dim FSO, F, F1, FC, S
Set fso = CreateObject ("Scripting.FileSystemObject")
Set f = fso. GetFolder (server. MapPath ("."))
Set Fs=f.subfolders
Set FC =f.files

For all FSS in FS
Dim folder_name
Folder_name=fss.name
%>
<a href= "folder_list.asp?act=list_cur&cur_path=<%=fss%>" ><span style= "Font-family:wingdings" >0</span><%=folder_name%></a><br>
<%
Next

%>
<%
For each F1 in FC
Dim filename
Filename=f1.name
%>
<a href= "<%=p2v_path (F1)%>" ><span style= "Font-family:wingdings 2" >/</span><%=filename% ></a><br>
<%
Next

Set fso=nothing
End Sub
%>


<%
'------------------------------------------------display directories and files under the specified path
Sub List_cur
Dim FSO, F, F1, FC, S
Set fso = CreateObject ("Scripting.FileSystemObject")
Set f = fso. GetFolder (Request ("Cur_path"))
Set Fs=f.subfolders
Set FC =f.files

For all FSS in FS
Dim folder_name
Folder_name=fss.name
%>
<a href= "folder_list.asp?act=list_cur&cur_path=<%=fss%>" ><span style= "Font-family:wingdings" >0</span><%=folder_name%></a><br>
<%
Next

%>


<%
For each F1 in FC
Dim filename
Filename=f1.name
%>
<a href= "<%=p2v_path (F1)%>" ><span style= "Font-family:wingdings 2" >/</span><%=filename% ></a><br>
<%
Next
Set fso=nothing
End Sub
%>





<%
'------------------------------------------------display subdirectories and subfolders of the parent directory
Sub List_parent
On Error Resume Next
Dim FSO, F, F1, FC, S
Set fso = CreateObject ("Scripting.FileSystemObject")
Set f = fso. GetFolder (Display_cur_path)
Set Fs=f.subfolders
Set FC =f.files

For all FSS in FS
Dim folder_name
Folder_name=fss.name

%>
<a href= "folder_list.asp?act=list_cur&cur_path=<%=fss%>" ><span style= "Font-family:wingdings" >0</span><%=folder_name%></a><br>
<%

Next

%>

<%
For each F1 in FC
Dim filename
Filename=f1.name
%>
<a href= "<%=p2v_path (F1)%>" ><span style= "Font-family:wingdings 2" >/</span><%=filename% ></a><br>
<%
Next
Set fso=nothing
On Error Goto 0
End Sub

'---------------------------------------------get the path to the superior directory
function Get_parent_folder ()
On Error Resume Next
&nbs



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.