Solved

monitoring a folder / file size

Posted on 2004-10-07
6
189 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
Comment Utility
That seems like a perfect situation for quotas. Why don't you want to use'em?

0
 
LVL 17

Author Comment

by:Microtech
Comment Utility
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
Comment Utility
''--- 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
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
LVL 76

Assisted Solution

by:David Lee
David Lee earned 25 total points
Comment Utility
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
Comment Utility
thanks for your comments, I will investigate.
0
 
LVL 17

Author Comment

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

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Recreate New ADC 1 270
VBScript not processed at Windows 8.1 logon 2 7,895
Pskill not working on VBS script 4 133
Windows 16 338
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…
Find out what Office 365 Transport Rules are, how they work and their limitations managing Office 365 signatures.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

762 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now