Memo/2004-06-08
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
単語検索
|
最終更新
|
ヘルプ
]
開始行:
#contents
*WSH 関連情報 [#i21d7e94]
**VBScript [#i2f43cae]
***ファイルのリストを表示するプログラム [#p406614d]
-サンプルコード
#ref(FileList.vbs);
' FileList.vbs
' Usage : CScript //NoLogo FileList.vbs
Dim fso
Set fso = CreateObject("Scripting.FileSystemObject")
Dim folder
Set folder = fso.GetFolder(".")
Dim subFolder
For Each subFolder In folder.SubFolders
WScript.Echo _
subFolder.DateCreated & " " & _
subFolder.DateLastModified & " " & _
subFolder.DateLastAccessed & " " & _
"<DIR> " & subFolder.Name
Next
Dim file
For Each file In folder.Files
WScript.Echo _
file.DateCreated & " " & _
file.DateLastModified & " " & _
file.DateLastAccessed & " " & _
file.Name
Next
-実行結果
D:\home\edu\VBScript\FileList>CScript //NoLogo FileList....
2004/06/08 17:28:03 2004/06/08 17:28:03 2004/06/08 17:28...
2004/06/08 17:28:06 2004/06/08 17:28:06 2004/06/08 17:28...
2004/06/08 17:39:47 2004/06/08 17:39:40 2004/06/08 17:39...
2004/06/08 17:23:07 2004/06/08 17:23:07 2004/06/08 17:23...
2004/06/08 17:21:12 2004/06/08 17:39:40 2004/06/08 17:39...
-はてな
--http://www.hatena.ne.jp/1086680518
-関連情報
--http://www.hondarer-soft.com/cx/pukiwiki/pukiwiki.php?M...
終了行:
#contents
*WSH 関連情報 [#i21d7e94]
**VBScript [#i2f43cae]
***ファイルのリストを表示するプログラム [#p406614d]
-サンプルコード
#ref(FileList.vbs);
' FileList.vbs
' Usage : CScript //NoLogo FileList.vbs
Dim fso
Set fso = CreateObject("Scripting.FileSystemObject")
Dim folder
Set folder = fso.GetFolder(".")
Dim subFolder
For Each subFolder In folder.SubFolders
WScript.Echo _
subFolder.DateCreated & " " & _
subFolder.DateLastModified & " " & _
subFolder.DateLastAccessed & " " & _
"<DIR> " & subFolder.Name
Next
Dim file
For Each file In folder.Files
WScript.Echo _
file.DateCreated & " " & _
file.DateLastModified & " " & _
file.DateLastAccessed & " " & _
file.Name
Next
-実行結果
D:\home\edu\VBScript\FileList>CScript //NoLogo FileList....
2004/06/08 17:28:03 2004/06/08 17:28:03 2004/06/08 17:28...
2004/06/08 17:28:06 2004/06/08 17:28:06 2004/06/08 17:28...
2004/06/08 17:39:47 2004/06/08 17:39:40 2004/06/08 17:39...
2004/06/08 17:23:07 2004/06/08 17:23:07 2004/06/08 17:23...
2004/06/08 17:21:12 2004/06/08 17:39:40 2004/06/08 17:39...
-はてな
--http://www.hatena.ne.jp/1086680518
-関連情報
--http://www.hondarer-soft.com/cx/pukiwiki/pukiwiki.php?M...
ページ名: