| Set objFolder = Shell.NameSpace( "::{645FF040-5081-101B-9F08-00AA002F954E}" )
Set objFolderItems = objFolder.Items()
nCount = objFolderItems.Count
' 列挙1
strData = ""
For i = 0 to nCount - 1
strData = strData & objFolderItems.Item(i).Name & vbCrLf
strData = strData & objFolderItems.Item(i).ModifyDate & vbCrLf
strData = strData & objFolderItems.Item(i).Path & vbCrLf
strData = strData & objFolderItems.Item(i).Size & vbCrLf
strData = strData & objFolderItems.Item(i).Type & vbCrLf
strData = strData & vbCrLf
Next
WScript.Echo strData
' 列挙2
strData = ""
For Each obj In objFolderItems
strData = strData & objFolder.GetDetailsOf(obj, 0) & vbCrLf
strData = strData & objFolder.GetDetailsOf(obj, 1) & vbCrLf
strData = strData & objFolder.GetDetailsOf(obj, 2) & vbCrLf
strData = strData & objFolder.GetDetailsOf(obj, 3) & vbCrLf
strData = strData & objFolder.GetDetailsOf(obj, 4) & vbCrLf
strData = strData & objFolder.GetDetailsOf(obj, -1) & vbCrLf
strData = strData & vbCrLf
Next
WScript.Echo strData
| |