A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

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



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old August 22nd 07, 10:00 AM posted to microsoft.public.outlook.program_vba
andy
external usenet poster
 
Posts: 122
Default How can I find out the "*.pst" file size by using VBS program?

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?
Ads
  #2  
Old August 22nd 07, 03:02 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default How can I find out the "*.pst" file size by using VBS program?

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.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Andy" wrote in message
...
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?


  #3  
Old August 23rd 07, 12:43 AM posted to microsoft.public.outlook.program_vba
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default How can I find out the "*.pst" file size by using VBS program?

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

"Andy" wrote in message
...
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?



 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot send attachments "The system cannot find the file specified" Kozmo Outlook - General Queries 0 April 14th 07 06:17 PM
Error message "cannot find file specified" when trying to save pho joyofsoy Outlook Express 6 April 13th 07 01:47 PM
Control with the same behavior as "Type a question for help" or "Find contact" [email protected] Add-ins for Outlook 0 March 2nd 07 01:54 PM
"save picture as" = error- "system cannot find file specified" Joe P. Outlook Express 3 November 22nd 06 07:52 AM
Cannot "Open" "Import/Export' or use "Data File Management" Ed Isenberg Outlook - Installation 3 July 16th 06 12:31 AM


All times are GMT +1. The time now is 06:04 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2024 Outlook Banter.
The comments are property of their posters.