How can I find out the "*.pst" file size by using VBS program?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

We encounter lots of trouble because the "*.pst" is greate then 2G.
I would like to write a program to collect the "*.pst" file size and feed
back to database automatically. Is there something I can call from API?
 
About all you can do is to get the sizes of all the items in every folder
you have and add them up to get an approximation of your PST file size. That
won't account for hidden messages, overhead and various other things but it
will give you an estimate. Maybe add about 10% to your calculated size,
although that's a guess, I've never played with the actual average overhead.
 
All you really need to do is figure out the PST store file name, then you
can use the file system API to figure out the file size.
1. you can hack the store file name from the store entry id -
MAPIFolder.StoreID - see the archives of this group for sample code
2. <plug> use Redemption (URL below) - you can either loop through the
RDOSession.Stores collection, then check the store type
(RDOStore.StoreKind), then use RDOPstStore.PstPath property. Or use ProfMan:
(http://www.dimastr.com/redemption/profiles.htm#example2) to enumerate all
PST stores in all or some profiles </plug>

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
Back
Top