Possible to monitor file size for warning when limit is approached

J

jrtuenge

Is there any way I can set up automatic monitoring of the size of a given
file, e.g. Outlook PST, so that an error message is generated when the file
size approaches a certain limit? This is for my home PC, not on a server.
Thanks!
 
J

jrtuenge

OK, so I lied a little for brevity... I'm actually using Outlook Express 6.
But ideally, this monitoring tool would work for any type of file -- the user
would just specify the filepath and file size restriction. Does any such
tool exist?
 
P

Pegasus \(MVP\)

jrtuenge said:
OK, so I lied a little for brevity... I'm actually using Outlook Express
6.
But ideally, this monitoring tool would work for any type of file -- the
user
would just specify the filepath and file size restriction. Does any such
tool exist?

You could use the Task Scheduler to invoke this batch file each time you log
on:

@echo off
set Limit=100
set Filename=d:\Outlook\My Mailbox.pst

for %%a in ("%Filename%") do set Size=%%~za
set Size=%size:~0,-6%
if "%Size%"=="" goto :eof
if %Size% GTR %Limit% (
net start | find /i "messenger" || (
sc.exe config messenger start= demand
net start messenger
)
net send "%UserName%" "Your .PST file is larger than %Limit% MBytes"
)

You must set your own "Limit" (in MBytes) and the full name of your .PST
file. Do not retype this batch file - just copy & paste it.

When the job runs and the .PST file is larger than the specified limit then
you get a popup message.
 
J

jrtuenge

Looks like that'll do the trick -- thanks!

Pegasus (MVP) said:
You could use the Task Scheduler to invoke this batch file each time you log
on:

@echo off
set Limit=100
set Filename=d:\Outlook\My Mailbox.pst

for %%a in ("%Filename%") do set Size=%%~za
set Size=%size:~0,-6%
if "%Size%"=="" goto :eof
if %Size% GTR %Limit% (
net start | find /i "messenger" || (
sc.exe config messenger start= demand
net start messenger
)
net send "%UserName%" "Your .PST file is larger than %Limit% MBytes"
)

You must set your own "Limit" (in MBytes) and the full name of your .PST
file. Do not retype this batch file - just copy & paste it.

When the job runs and the .PST file is larger than the specified limit then
you get a popup message.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top