Computing.Net > Forums > Programming > Batch file for Outlook

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Batch file for Outlook

Reply to Message Icon

Name: kandrews
Date: June 11, 2007 at 08:36:29 Pacific
OS: Windows XP
CPU/Ram: 1.6GHz/1GB
Product: White Box
Comment:

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



Sponsored Link
Ads by Google

Response Number 1
Name: Razor2.3
Date: June 11, 2007 at 10:34:51 Pacific
Reply:

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


0

Response Number 2
Name: kandrews
Date: June 11, 2007 at 12:35:23 Pacific
Reply:

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


0

Response Number 3
Name: Razor2.3
Date: June 14, 2007 at 20:05:16 Pacific
Reply:

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.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

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


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Batch file for Outlook

Batch file input for logevent.exe www.computing.net/answers/programming/batch-file-input-for-logeventexe/15380.html

Batch file FOR LOOP www.computing.net/answers/programming/batch-file-for-loop/11504.html

Batch file for text replacement www.computing.net/answers/programming/batch-file-for-text-replacement/12883.html