Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I am looking to create a batch file that reports the size of an outlook .pst file. I desire to have a wild card that will look in the logged in user's directory under "Documents and Settings" and the default path to the outlook folder and pst file. I have a program that if you hard code the path it reports it as such: Total bytes: 201,147,392 (196,433.00 KB) (191.83 MB). Can I break up these fields and use them for an IF statement that displays an error if the file is over 1.5 GB
If extra info is needed I can provide the logic of it.
K. Andrews

What is Outlook's "default path to the outlook folder and pst file?" And you might as well post what you have now.

In Windows 2000 Pro and XP the path is C:\Documents and Settings\username\Local Settings\Application Data\Microsoft\Outlook\Outlook.pst
The script I wish to make would be something like this (note sizeof is a program that returns a file's size):
sizeof *FilePath*
IF filesize > 1500 MB
(Display Warning message)
ELSE
(Exit)Here is an example of the output of the sizeof program (typed out full path link on a vista system):
C:\Users\kandrews\Downloads>sizeof C:\Users\kandrews\AppData\Local\Microsoft\Out
look\Outlook.pst
Total bytes: 201,147,392 (196,433.00 KB) (191.83 MB)
K. Andrews

Wow, I leave for a few days, and no one posts this? The lot of you are slipping. Slipping, I say!
Well, if all you're going for is a warning message, it could be something like this batch file:
@for %%a in ("%userprofile%\AppData\Local\Microsoft\Outlook\*.*") do @IF /i %%~Za GEQ 1610612736 ECHO %a OVERSIZED
If you want to mimic the output, let me know. It can be done, but not easily with batch files. I'd recommend VBScript in that case.
If you want to mimic the output, that can be done too, but not easily with batch files. I'd recommend VBScript in that case.

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |