主页 > 知识库 > hta(vbs)列目录树代码

hta(vbs)列目录树代码

热门标签:智能手机 呼叫中心市场需求 铁路电话系统 服务器配置 检查注册表项 银行业务 网站文章发布 美图手机

复制代码 代码如下:

html>
head>
title>磁盘管理器/title>
/head>
body>
div id="DivList">/div>
script language="vbscript">
Sub List(sPath)
sPath = Replace(sPath, "*", " ")
Set FSO = CreateObject("Scripting.FileSystemObject")
Set c_drive = FSO.GetFolder(sPath)
Set c_files = c_drive.Files
Set c_folder = c_drive.SubFolders
sHTML = "table width='100%' border='1' cellspacing='0' cellpadding='0'>"
For Each a In c_files
sHTML = sHTML "tr>td>"
sBPath = a.Path
sHTML = sHTML a.Path
sHTML = sHTML "br />/td>/tr>"
Next
sHTML = sHTML "/table>"
Document.getElementById("DivList").innerHTML = sHTML
For Each b In c_folder
sHTML = sHTML "tr>td>"
sBPath = b.Path
sBPath = Replace(sBPath, " ", "*")
sBPath = Replace(sBPath, "\", "\\")
sHTML = sHTML "a href=# onclick=vbs:List(""" sBPath """)>" b.Path "/a>"
sHTML = sHTML "br />/td>/tr>"
Next
sHTML = sHTML "/table>"
Document.getElementById("DivList").innerHTML = sHTML
End Sub
strComputer = "."
Set wbemServices = Getobject("winmgmts:\\" strComputer)
Set wbemObjectSet=wbemServices.execquery("select name from Win32_PerfRawData_PerfDisk_LogicalDisk")
For Each mo In wbemObjectSet
if InstrRev(mo.name,":", -1, 0)>0 then
document.write "input type=button value="mo.name" onclick=list('"mo.name"\""')>"
end if
Next
/script>
/body>
/html>

标签:长治 乐山 红河 新疆 上海 河南 沧州 沈阳

巨人网络通讯声明:本文标题《hta(vbs)列目录树代码》,本文关键词  ;如发现本文内容存在版权问题,烦请提供相关信息告之我们,我们将及时沟通与处理。本站内容系统采集于网络,涉及言论、版权与本站无关。
  • 相关文章
  • 收缩
    • 微信客服
    • 微信二维码
    • 电话咨询

    • 400-1100-266