' VBScriptでファイル一覧を表示するプログラム
Dim Shell, DesktopPath, fso, fc, f, folder, s
Set Shell = CreateObject("WScript.Shell")
Set fso = CreateObject("Scripting.FileSystemObject")
s = ""
DesktopPath = Shell.SpecialFolders("Desktop")
Set folder = fso.GetFolder(DesktopPath)
For Each f in folder.Files
s = s & f.name & " - " & f.size & "B" & Chr(13) & Chr(10)
Next
MsgBox s