Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

monitoring a folder / file size

Posted on 2004-10-07
6
Medium Priority
?
205 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 400 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
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 
LVL 76

Assisted Solution

by:David Lee
David Lee earned 100 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

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

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…
By default Outlook 2016 displays only one time zone in the Calendar. The following article explains how to display two time zones in one calendar view.
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

718 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