Alternative to Disk Quota's

M

Matthew

Is there an alternative to disk quotas for windows 2000
server. I would like to set a warning level of 500MB on
the servers data drive and have the program run a batch
file to email/sms me the warning.

Matt
 
P

Pegasus \(MVP\)

Matthew said:
Is there an alternative to disk quotas for windows 2000
server. I would like to set a warning level of 500MB on
the servers data drive and have the program run a batch
file to email/sms me the warning.

Matt

You could schedule a job to run once every day, invoking this
batch file:

1 @echo off
2 Set DataDrive=D:\
3 Set Limit=0001500000000
4
5 for /F "tokens=3" %%a in ('dir /-c %DataDrive% ^| find /i "bytes free"')
do set free=0000000000000%%a
6 set free=%free:~-13%
7 echo Free space on drive %DataDrive% - %free% bytes
8
9 if "%free%" LSS "%Limit%" echo Drive %DataDrive% is full!

The routine will deal with numbers up to 9.9 TBytes.

Remove the line numbers before running the job. To send
an email, use one of the many public domain mailer programs,
e.g. mailto.exe, send.exe, blat.

Because this is a batch file, it can be used for all sorts of
other alerts too.
 

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