vbscriptにてOutlook Exressのメールファイル(.dbx)の一覧とサイズを出力する例です。

Option Explicit
'On Error Resume Next

'#######################################################
'# Global-Configration #
'#######################################################

Const OpenTextFileForReading = 1
Const OpenTextFileForWriting = 2
Const OpenTextFileForAppending = 8

Const HKEY_CURRENT_USER = &H80000001

'*************************
' Call Main Program
'*************************
Main()

'*************************
' Start Main Program
'*************************

Sub Main()

'#######################################################
'# Local-Configration #
'#######################################################

Dim OBJ_WshShell 'WSH Shell Object
Dim OBJ_FSO 'File System Object
Dim OBJ_Folders 'Folder Object

Dim COL_Folders 'Collection Object

Dim STR_FileName 'String Object
Dim STR_StoreOwner 'String Object
Dim STR_StorePath 'String Object
Dim STR_LogFolder 'String Object
Dim STR_LogFile 'String Object
Dim STR_Temp 'String Object
Dim i

Set OBJ_WshShell = WScript.CreateObject("WScript.Shell")
Set OBJ_FSO = WScript.CreateObject("Scripting.FileSystemObject")

'【Get Mail Store Owner & Mail Store Path】
STR_StoreOwner = OBJ_WshShell.RegRead("HKEY_CURRENT_USER\Identities\Last User ID")
If Err.Number <> 0 Then

STR_Work = MsgBox("処理実行中にエラーが発生しました。処理を続行出来ません。プログラムを中止します。" & vbCrLf & "Error Code: RegRead Error-001" ,vbOkOnly + vbCritical,"エラーが発生しました")
Err.Clear
Set OBJ_FSO = Nothing
WScript.Quit 1

End If

STR_StorePath = OBJ_WshShell.RegRead("HKEY_CURRENT_USER\Identities\" & STR_StoreOwner & "\Software\Microsoft\Outlook Express\5.0\Store root")
If Err.Number <> 0 Then

STR_Work = MsgBox("処理実行中にエラーが発生しました。処理を続行出来ません。プログラムを中止します。" & vbCrLf & "Error Code: RegRead Error-002" ,vbOkOnly + vbCritical,"エラーが発生しました")
Err.Clear
Set OBJ_FSO = Nothing
WScript.Quit 1

End If

WScript.Echo "No,ファイル名,ファイルサイズ(MB)"

'【Get MailBox Folder & File-Size】
Set OBJ_Folders = OBJ_FSO.GetFolder(STR_StorePath)
Set COL_Folders = OBJ_Folders.Files
i = 1

For Each STR_FileName In COL_Folders

If LCase(Right(STR_FileName,4)) = ".dbx" Then

WScript.Echo i & "," & STR_FileName & "," & Round(STR_FileName.Size / 1000000,1)
i = i + 1

End If

Next

End Sub

43 Comments

  1. naiste pidzaamad says:

    … [Trackback]

    […] Find More to that Topic: dragon-ark.com/archives/309 […]

  2. xây dưng villa 2022 says:

    … [Trackback]

    […] Read More Information here on that Topic: dragon-ark.com/archives/309 […]

  3. buy cc online says:

    … [Trackback]

    […] Find More Info here on that Topic: dragon-ark.com/archives/309 […]

  4. sig sauer website says:

    … [Trackback]

    […] Read More Information here to that Topic: dragon-ark.com/archives/309 […]

  5. ruger firearms rebate offers says:

    … [Trackback]

    […] Find More on that Topic: dragon-ark.com/archives/309 […]

  6. fake sell rolex submariner says:

    … [Trackback]

    […] Find More Info here on that Topic: dragon-ark.com/archives/309 […]

  7. kardinal stick says:

    … [Trackback]

    […] Information to that Topic: dragon-ark.com/archives/309 […]

  8. World Market Link says:

    … [Trackback]

    […] There you can find 91444 more Information on that Topic: dragon-ark.com/archives/309 […]

  9. Dark0de Market URL says:

    … [Trackback]

    […] Read More here on that Topic: dragon-ark.com/archives/309 […]

  10. sagame says:

    … [Trackback]

    […] Read More on that Topic: dragon-ark.com/archives/309 […]

  11. สล็อตเว็บตรง says:

    … [Trackback]

    […] Find More on to that Topic: dragon-ark.com/archives/309 […]

  12. Darknet says:

    … [Trackback]

    […] Here you will find 56954 additional Info on that Topic: dragon-ark.com/archives/309 […]

  13. คาสิโนออนไลน์เว็บตรง says:

    … [Trackback]

    […] Find More Information here on that Topic: dragon-ark.com/archives/309 […]

  14. mega888 says:

    … [Trackback]

    […] Read More Information here on that Topic: dragon-ark.com/archives/309 […]

  15. buy cheap ccv says:

    … [Trackback]

    […] Here you can find 32615 additional Information to that Topic: dragon-ark.com/archives/309 […]

  16. slot999 says:

    … [Trackback]

    […] Read More on that Topic: dragon-ark.com/archives/309 […]

  17. dumps websites says:

    … [Trackback]

    […] Read More on on that Topic: dragon-ark.com/archives/309 […]

  18. สล็อตวอเลท ไม่มีขั้นต่ำ says:

    … [Trackback]

    […] Read More on that Topic: dragon-ark.com/archives/309 […]

  19. google.je says:

    … [Trackback]

    […] There you can find 2408 additional Info on that Topic: dragon-ark.com/archives/309 […]

  20. สล็อตเว็บตรง says:

    … [Trackback]

    […] Find More Info here to that Topic: dragon-ark.com/archives/309 […]

  21. Godrej Splendour says:

    … [Trackback]

    […] Find More on that Topic: dragon-ark.com/archives/309 […]

  22. nova88 says:

    … [Trackback]

    […] Find More on that Topic: dragon-ark.com/archives/309 […]

  23. Alyssa SALT - love song says:

    … [Trackback]

    […] Here you can find 24722 more Info on that Topic: dragon-ark.com/archives/309 […]

  24. Devops Companies says:

    … [Trackback]

    […] Information to that Topic: dragon-ark.com/archives/309 […]

  25. Buy American Eagle Handgun (250 Rounds) 9mm Luger says:

    … [Trackback]

    […] Here you will find 34056 more Info on that Topic: dragon-ark.com/archives/309 […]

  26. sbo says:

    … [Trackback]

    […] Info to that Topic: dragon-ark.com/archives/309 […]

  27. ตัดกราม says:

    … [Trackback]

    […] Here you can find 98581 additional Information to that Topic: dragon-ark.com/archives/309 […]

  28. แทงบอลโลก 2022 says:

    … [Trackback]

    […] Here you can find 16607 more Info to that Topic: dragon-ark.com/archives/309 […]

  29. sbobet says:

    … [Trackback]

    […] Find More on that Topic: dragon-ark.com/archives/309 […]

  30. สล็อตวอเลท ไม่มีขั้นต่ำ says:

    … [Trackback]

    […] Find More to that Topic: dragon-ark.com/archives/309 […]

  31. https://colourcee.bet/ says:

    … [Trackback]

    […] Information on that Topic: dragon-ark.com/archives/309 […]

  32. Daily Prayers says:

    … [Trackback]

    […] Find More to that Topic: dragon-ark.com/archives/309 […]

  33. คลิปหลุดใหม่ says:

    … [Trackback]

    […] Read More on that Topic: dragon-ark.com/archives/309 […]

  34. try here says:

    … [Trackback]

    […] Here you will find 70197 more Information on that Topic: dragon-ark.com/archives/309 […]

  35. Darknet says:

    … [Trackback]

    […] Information to that Topic: dragon-ark.com/archives/309 […]

  36. Darknet Support says:

    … [Trackback]

    […] Info on that Topic: dragon-ark.com/archives/309 […]

  37. cabo san lucas real estate says:

    … [Trackback]

    […] Find More Info here to that Topic: dragon-ark.com/archives/309 […]

  38. https://vsmb.vn says:

    … [Trackback]

    […] Find More Information here on that Topic: dragon-ark.com/archives/309 […]

  39. quality assurance says:

    … [Trackback]

    […] Information to that Topic: dragon-ark.com/archives/309 […]

  40. Guns For Sale Online says:

    … [Trackback]

    […] Here you can find 94989 additional Information on that Topic: dragon-ark.com/archives/309 […]

  41. buy magnum research gun says:

    … [Trackback]

    […] Find More here on that Topic: dragon-ark.com/archives/309 […]

  42. c2bit cards says:

    … [Trackback]

    […] Find More here to that Topic: dragon-ark.com/archives/309 […]

  43. รับจำนองที่ดิน says:

    … [Trackback]

    […] Find More on on that Topic: dragon-ark.com/archives/309 […]

Leave a Reply