Solved

monitoring a folder / file size

Posted on 2004-10-07
6
196 Views
Last Modified: 2010-04-14
I would like to set up a monitoring of a folder which contains two files, once they get to a certain size collectively I would like to be notified. Is there anything native to windows 2003 that can do this?

I do not want set up quotas.
0
Comment
Question by:Microtech
6 Comments
 
LVL 4

Expert Comment

by:shard26
ID: 12251986
That seems like a perfect situation for quotas. Why don't you want to use'em?

0
 
LVL 17

Author Comment

by:Microtech
ID: 12252041
it is the exchange database I want to monitor, as soon as it gets above 15gb I need to be notified, quotas will not work on this. Sorry, I was just wondering if there was a native tool ... http://www.experts-exchange.com/Networking/Email_Groupware/Exchange_Server/Q_21149273.html 
0
 
LVL 10

Accepted Solution

by:
Longbow earned 100 total points
ID: 12252511
''--- FileSize Script ---
Set WshShell = WScript.CreateObject("WScript.Shell")
Dim fso, f, s
   filespec = "c:\test.txt"
   Set fso = CreateObject("Scripting.FileSystemObject")
   Set f = fso.GetFile(filespec)
   s = UCase(f.Name) & " uses " & f.size & " bytes."
   ShowFolderSize = s
   msgbox ShowFolderSize
   if f.size >= 1000 Then msgbox "Size exceeded !"
   if f.size >= 1000 Then wshshell.run ("net send xxx " & "Size exceeded !")
'--- End of script ---

Save the above in a .vbs file.

It will check the size of c:\test.txt
When the file reaches 1000 bytes a message will be sent to a computer with the "net send" comand.

I can modify the script so it will run all the day, waiting for the condition.
Actually it can be run from a logon script and alert you if the size is 1000 bytes or more.
15 Gb is 16106127360 bytes.
The msgbox command displays the message on the computer where the script is running.
0
The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

 
LVL 76

Assisted Solution

by:David Lee
David Lee earned 25 total points
ID: 12255606
If the mail database is on a drive by itself, or could be moved to a separate drive, then you could use Exchange's monitoring feature to send yourself an alert.  Or, if you have access to Visual Basic, then you could create a folder watching application.  Here's a link (http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_20881770.html) to an EE question about folder watching that includes links to several examples.    Otherwise, Longbow's script seems like a good solution.
0
 
LVL 17

Author Comment

by:Microtech
ID: 12257029
thanks for your comments, I will investigate.
0
 
LVL 17

Author Comment

by:Microtech
ID: 12679942
sorry for the time it has taken.... this question will be finalized within the next week
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
This tutorial shows how to create a greeting card by combining two image layers and a text layer on a PC using a free image editing app.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question