Functions | drives | arrays | dropdown | dropdown | function | drive | array | dropdown | dropdown list <TITLE> New Document </TITLE>
<meta name= "generator" content= "EditPlus" >
<meta name= "Author" content= "" >
<meta name= "Keywords" content= "" >
<meta name= "Description" content= "" >
<style>
BODY{TEXT-ALIGN:LEFT;FONT:12PX #000080;}
#main {float:left;width:680px;border: #0000ff 1px solid;margin:5px 20px;padding:10px 100px;}
#main p{}
</style>
</HEAD>
<BODY>
<div id= "Main" >
<%
' Option Explicit
Select Case Request ("ActionName")
Case "Find"
Call Find (Request ("DirName"))
Case "Entry"
Call Enterdir (Request ("DirName")
Case otherwise
Call Showmain ()
End Select
Actionarray=storearrayvalue ("Find, search, go, enter", ",")
Drvname=split (Showdrivelist, ",")
Response.Write "<form name=drv action=find.asp>"
Response.Write Writeselect (Actionarray,actionname)
Response.Write Writeselect (Drvname,dirname)
Response.Write "<input type=submit name=action value= start ></form>"
' This function is used to assign a value to an array, arrayvalue the string value to be assigned, splitmethod the basis for splitting this string
Function Storearrayvalue (Arrayvalue,splitmethod)
Storearrayvalue=split (Arrayvalue,splitmethod)
End Function
' This function returns the Drop-down list string, arrayname as the passed-in array name, sltname the name of the Drop-down list
Function Writeselect (Arrayname,sltname)
Dim slt,i
slt= "<select name=" & Sltname & ">"
For i=0 to UBound (arrayname)
Slt=slt & "<option value=" & Arrayname (i) & ">" & Arrayname (i) & "</option>"
Next
Slt=slt & "</select>"
Writeselect=slt
End Function
' This function returns all drives
Function showdrivelist
Dim FSO, D, dc,i,s
Set fso = CreateObject ("Scripting.FileSystemObject")
Set DC = fso. Drives
I=0
For each D in DC
s=s&d.driveletter& ","
I=i+1
Next
S=mid (S,1,len (s)-1)
Showdrivelist=s
End Function
' This process outputs the capacity status of the selected drive.
Showdriveinfo ("E:\")
Sub Showdriveinfo (Drvpath)
Dim FSO, DRV, s
Set fso = CreateObject ("Scripting.FileSystemObject")
Set DRV = fso. Getdrive (FSO. GetDriveName (Drvpath))
s = "Drive" & UCase (Drvpath) & "-"
s = S & DRV. VolumeName & "<br/>"
s = S & "total spaces:" & FormatNumber (DRV). TotalSize/(1024*1024*1024),-1)
s = S & "GB" & "<br/>"
s = S & "Free Spaces:" & FormatNumber (DRV). FreeSpace/(1024*1024*1024),-1)
s = S & "GB" & "<br/>"
Response.Write S
End Sub
%>
</div>
</body>