代码如下:
<html>
<Evista>
<title> 磁盘管理器 </title>
</ablo>
<Body>
<div id = "divlist"> </div>
<script language = "VBScript">
Sub List (Spath)
spath = reemplazar (spath, "*", "")
Establecer fso = createObject ("scripting.filesystemObject")
Establecer c_drive = fso.getfolder (spath)
Establecer c_files = c_drive.files
Establecer c_folder = c_drive.subfolders
shtml = "<table width = '100%' border = '1' CellSpacing = '0' CellPadding = '0'>"
Para cada una en c_files
shtml = shtml & "<tr> <td>"
sbpath = a.path
shtml = shtml & a.path
shtml = shtml & "<r/> </td> </tr>"
Próximo
shtml = shtml & "</table>"
Document.getElementById ("Divlist"). Innerhtml = shtml
Para cada b en c_folder
shtml = shtml & "<tr> <td>"
sbpath = b.path
sbpath = reemplazar (sbpath, "", "*")
sbpath = reemplazar (sbpath, "/", "//")
shtml = shtml & "<a href =# onclick = vbs: list (" "" & sbpath & "" ")>" & b.path & "</a>"
shtml = shtml & "<r/> </td> </tr>"
Próximo
shtml = shtml & "</table>"
Document.getElementById ("Divlist"). Innerhtml = shtml
Final
strcomputer = "."
Establecer wbemServices = getObject ("winmgmts: //" & strcomuter)
Establecer wbeMObjectSet = wbemServices.execquery ("Seleccione Nombre de Win32_perfrawData_PerfDisk_LogicalDisk")
Para cada mes en wbemobjectset
if instrrev (mo.name, ":", -1, 0)> 0 entonces
document.write "<input type = button value =" & mo.name & "onClick = list ('" & mo.name & "/" & "')>"
final si
Próximo
</script>
</body>
</html>