javascript遍历文件夹

时间:2015-09-26 16:18:12
【文件属性】:

文件名称:javascript遍历文件夹

文件大小:914B

文件格式:HTML

更新时间:2015-09-26 16:18:12

javascript 遍历

FSO对象有Drives属性,他就是你需要的,比如下面这段vbs代码,就是遍历盘符 Function ShowDriveList Dim fso, d, dc, s, n Set fso = CreateObject("Scripting.FileSystemObject") Set dc = fso.Drives For Each d in dc n = "" s = s & d.DriveLetter & " - " If d.DriveType = 3 Then n = d.ShareName ElseIf d.IsReady Then n = d.VolumeName End If s = s & n & "
" Next ShowDriveList = s End Function


网友评论