Solved

monitoring a folder / file size

Posted on 2004-10-07
6
201 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
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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…
While it may be true that the internet is a place of possibilities, it is also a hostile environment lurking with many dangers. By clicking on the wrong link, trusting the wrong person or using a weak password, you are virtually inviting hackers to …
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

685 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