ソース掲示板




すべてから検索

キーワード   条件 表示 現行ログ 過去ログ トピックス 名前 本文
デスクトップの列挙 ( No.9 )
日時: 2013/05/02 00:20
名前: lightbox



http://winofsql.jp/wsf/enumDesktop.wsf

<JOB>
<COMMENT>
************************************************************
 WSH 実行スケルトン
************************************************************
</COMMENT>

<COMMENT>
************************************************************
 外部スクリプト定義
************************************************************
</COMMENT>
<SCRIPT
	language="VBScript"
	src="http://homepage2.nifty.com/lightbox/laylaClass.vbs">
</SCRIPT>

<SCRIPT language=VBScript>
' ***********************************************************
' 処理開始
' ***********************************************************
Call laylaFunctionTarget( "http://homepage2.nifty.com/lightbox/" )
Call laylaLoadFunction( "baseFunction.vbs" )

GetShell

Crun2 120

Wscript.Echo "【デスクトップ】"
Wscript.Echo "----------------------------------------------------"
Set objFolder = Shell.NameSpace( 0 )

Set objFolderItems = objFolder.Items()
nCount = objFolderItems.Count

' 列挙1
strData = ""
For i = 0 to nCount - 1

	strData = strData & RpadB(objFolderItems.Item(i).Name," ",30 )
'	strData = strData & RpadB(objFolderItems.Item(i).ModifyDate," ",30 )
	strData = strData & RpadB(objFolderItems.Item(i).Path," ",89 )
'	strData = strData & RpadB(objFolderItems.Item(i).Size," ",20 )
'	strData = strData & RpadB(objFolderItems.Item(i).Type," ",20 )
	WScript.Echo strData
	strData = ""

Next


' 列挙2
strData = ""
For Each obj In objFolderItems

	strData = strData & RpadB(objFolder.GetDetailsOf(obj, 0)," ",20 )
	strData = strData & RpadB(objFolder.GetDetailsOf(obj, 1)," ",20 )
	strData = strData & RpadB(objFolder.GetDetailsOf(obj, 2)," ",20 )
	strData = strData & RpadB(objFolder.GetDetailsOf(obj, 3)," ",20 )
	strData = strData & RpadB(objFolder.GetDetailsOf(obj, 4)," ",20 )
	strData = strData & RpadB(objFolder.GetDetailsOf(obj, -1)," ",20 )
	WScript.Echo strData
	strData = ""

Next

Wscript.Echo

</SCRIPT>
</JOB>