<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Arial","sans-serif";
        color:blue;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-GB" link="blue" vlink="purple">

<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:blue;mso-fareast-language:EN-US">Hi Ray,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:blue;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:blue;mso-fareast-language:EN-US">That’s exactly how you’d use it. Just change foldername to the folder required, change strFilePath if you’re on a 64 bit system (so it
 would be “C:\Program Files (x86)\BBWin\tmp”) and change the 300 to the value in Mb that you want to use. Then just change your externals section of BBWin.cfg to add a line like <load value="C:\Windows\System32\cscript.exe C:\Program Files\BBWin\ext\Folder.vbs"
 /> or the x86 program files directory if on 64 bit.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:blue;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:blue;mso-fareast-language:EN-US">I’ve found it better to use the full path of cscript.exe and the actual script as I’ve had issues without them.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:blue;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:blue;mso-fareast-language:EN-US">If you download VBSEdit (<a href="http://www.vbsedit.com/">http://www.vbsedit.com/</a>) you can actually create an executable from the
 script which means no one can change it. Then you would just use <o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:blue;mso-fareast-language:EN-US"><load value="C:\Program Files\BBWin\ext\Folder.exe" /><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:blue;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:blue;mso-fareast-language:EN-US">Hope that helps,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:blue;mso-fareast-language:EN-US">Neil.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:blue;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif"">From:</span></b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif""> Ray Reuter [mailto:ray.reuter@gmail.com]
<br>
<b>Sent:</b> 14 May 2013 14:56<br>
<b>To:</b> Neil Simmonds<br>
<b>Cc:</b> Xymon@xymon.com<br>
<b>Subject:</b> Re: [Xymon] Folder Size<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Thank you Neil<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">So this would be an external script for me to put in the ext folder and then call it using the bbwin.cfg file correct. I am trying to understand the external scripts more and I have been doing a lot of reading. I wish I were more of a programmer.<o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On Tue, May 14, 2013 at 8:33 AM, Neil Simmonds <<a href="mailto:Neil.Simmonds@express-gifts.co.uk" target="_blank">Neil.Simmonds@express-gifts.co.uk</a>> wrote:<o:p></o:p></p>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:blue">Here’s a vbScript you could use, the example would flag red if C:\Data was > 300Mb in size</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:blue"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Courier New"">testName = <span style="color:gray">"Folder"</span><br>
outputfilename = <span style="color:blue">Replace</span>(testName,<span style="color:gray">"."</span>,<span style="color:gray">""</span>)<br>
strFilePath=<span style="color:gray">"C:\Program Files\BBWin\tmp"</span><br>
strProcessColour = <span style="color:gray">"green"</span><br>
<span style="color:blue">Set</span> fso= <span style="color:blue">CreateObject</span>(<span style="color:gray">"Scripting.FileSystemObject"</span>)<br>
<br>
<span style="color:blue">Set</span> f = fso.OpenTextFile(strFilePath & <span style="color:gray">"\"</span> & outputfilename , <span style="color:maroon">8</span> , <span style="color:blue">True</span>)<br>
<br>
<span style="color:blue">dim</span> FSO, objFolder,datafolder, foldername<br>
<br>
foldername = <span style="color:gray">"c:\Data"</span><br>
<br>
<span style="color:blue">If</span> fso.FolderExists(foldername ) <span style="color:blue">Then</span><br>
<span style="color:blue">Set</span> objFolder= FSO.GetFolder(foldername )  <span style="color:green">'getting folder size objFolder.Size\par</span><br>
ShowFolderDetails objFolder<br>
    <br>
<span style="color:blue">Sub</span> ShowFolderDetails(oF)<br>
datafolder  = oF.Size / <span style="color:maroon">1048576</span><br>
    <span style="color:blue">If</span> (datafolder > <span style="color:maroon">300</span>) <span style="color:blue">Then</span><br>
        strProcessColour = <span style="color:gray">"red"</span><br>
        f.Write strProcessColour & <span style="color:gray">" "</span> & <span style="color:blue">Date</span> & <span style="color:gray">" "</span> & <span style="color:blue">Time</span> & <span style="color:blue">vbCrLf</span> & <span style="color:blue">vbCrLf</span><br>
        f.Write <span style="color:gray">"Folder Name       : "</span> & foldername & <span style="color:blue">vbCrLf</span><br>
        f.Write <span style="color:gray">"Folder Size (Mb)  : "</span> & datafolder & <span style="color:blue">vbCrLf</span><br>
        f.Write <span style="color:gray">"Folder size exceeeds 300Mb"</span><br>
    <span style="color:blue">Else</span><br>
        strProcessColour = <span style="color:gray">"green"</span><br>
        f.Write strProcessColour & <span style="color:gray">" "</span> & <span style="color:blue">Date</span> & <span style="color:gray">" "</span> & <span style="color:blue">Time</span> & <span style="color:blue">vbCrLf</span> & <span style="color:blue">vbCrLf</span><br>
        f.Write <span style="color:gray">"Folder Name       : "</span> & foldername & <span style="color:blue">vbCrLf</span><br>
        f.Write <span style="color:gray">"Folder Size (Mb)  : "</span> & datafolder & <span style="color:blue">vbCrLf</span><br>
        f.Write <span style="color:gray">"Folder Size OK"</span> <br>
    <span style="color:blue">End</span> <span style="color:blue">If</span><br>
<span style="color:blue">End</span> <span style="color:blue">Sub</span>    <br>
<span style="color:blue">End</span> <span style="color:blue">If</span><br>
<br>
f.Close</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:blue"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:blue"> </span><o:p></o:p></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif"">From:</span></b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif"">
 Xymon [mailto:<a href="mailto:xymon-bounces@xymon.com" target="_blank">xymon-bounces@xymon.com</a>]
<b>On Behalf Of </b>Ray Reuter<br>
<b>Sent:</b> 14 May 2013 12:26<br>
<b>To:</b> Martin Flemming<br>
<b>Cc:</b> <a href="mailto:xymon@xymon.com" target="_blank">xymon@xymon.com</a><br>
<b>Subject:</b> Re: [Xymon] Folder Size</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">The host in question is a windows server. I should have mentioned that in the initial thread, I did read previously where it could be done with ease in the non-windows world but
 have found nothing for windows. It has a cifs share presented to it and we are trying to avoid having that particular folder grow beyond 3GB.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:12.0pt"> <o:p></o:p></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">On Mon, May 13, 2013 at 2:42 PM, Martin Flemming <<a href="mailto:martin.flemming@desy.de" target="_blank">martin.flemming@desy.de</a>> wrote:<o:p></o:p></p>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt">
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:12.0pt">On Mon, 13 May 2013, Ray Reuter wrote:<o:p></o:p></p>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt">
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Does anyone know of a way to monitor the size of a folder? I am not a programmer so I figured I would reach out to you and see who might have done this already or knows of<br>
someone who has been successful.<o:p></o:p></p>
</blockquote>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Hi !<br>
<br>
<br>
Something like in<br>
<br>
analysis.cfg<br>
<br>
HOST=server1<br>
DIR %^/var/log/.* size<2000000 TRACK<br>
<br>
and in client-local.cfg<br>
<br>
[server1]<br>
dir:`find /var/log -maxdepth 1 -type d`<br>
<br>
cheers,<br>
        martin<o:p></o:p></p>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><br>
_______________________________________________<br>
Xymon mailing list<br>
<a href="mailto:Xymon@xymon.com" target="_blank">Xymon@xymon.com</a><br>
<a href="http://lists.xymon.com/mailman/listinfo/xymon" target="_blank">http://lists.xymon.com/mailman/listinfo/xymon</a><o:p></o:p></p>
</div>
</div>
</blockquote>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:9.0pt">Name & Registered Office: EXPRESS GIFTS LIMITED, 2 GREGORY ST, HYDE, CHESHIRE, ENGLAND, SK14 4TH, Company No. 00718151.</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:9.0pt">Express Gifts Limited is authorised and regulated by the Financial Services Authority</span><o:p></o:p></p>
<div class="MsoNormal" align="center" style="text-align:center">
<hr size="2" width="100%" align="center">
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:9.0pt">NOTE: This email and any information contained within or attached in a separate file is confidential and intended solely for the Individual to whom
 it is addressed. The information or data included is solely for the purpose indicated or previously agreed. Any information or data included with this e-mail remains the property of Findel PLC and the recipient will refrain from utilising the information for
 any purpose other than that indicated and upon request will destroy the information and remove it from their records. Any views or opinions presented are solely those of the author and do not necessarily represent those of Findel PLC. If you are not the intended
 recipient, be advised that you have received this email in error and that any use, dissemination, forwarding, printing, or copying of this email is strictly prohibited. No warranties or assurances are made in relation to the safety and content of this e-mail
 and any attachments. No liability is accepted for any consequences arising from it. Findel Plc reserves the right to monitor all e-mail communications through its internal and external networks. If you have received this email in error please notify our IT
 helpdesk on <a href="tel:%2B44%280%29%201254%20303030" target="_blank">+44(0) 1254 303030</a></span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:9.0pt"> </span><o:p></o:p></p>
</div>
</blockquote>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</div>


<span style='mso-ascii-font-family:Calibri;mso-hansi-font-family:Calibri;mso-bidi-font-family:
Calibri;color:black'></span></p>

<p class=MsoNormal><span style='font-size:9.0pt'>Name & Registered Office:
EXPRESS GIFTS LIMITED, 2 GREGORY ST, HYDE, CHESHIRE, ENGLAND, SK14 4TH, Company
No. 00718151.</span></p>

<p class=MsoNormal style='border:none;mso-border-bottom-alt:solid windowtext 1.5pt;
padding:0cm;mso-padding-alt:0cm 0cm 1.0pt 0cm'><span style='font-size:9.0pt'>Express
Gifts Limited is authorised and regulated by the Financial Services Authority</span></p>
<hr width="100%">

<p class=MsoNormal><span style='font-size:9.0pt'>NOTE: This email and any
information contained within or attached in a separate file is confidential and
intended solely for the Individual to whom it is addressed. The information or
data included is solely for the purpose indicated or previously agreed. Any
information or data included with this e-mail remains the property of Findel
PLC and the recipient will refrain from utilising the information for any
purpose other than that indicated and upon request will destroy the information
and remove it from their records. Any views or opinions presented are solely
those of the author and do not necessarily represent those of Findel PLC. If
you are not the intended recipient, be advised that you have received this
email in error and that any use, dissemination, forwarding, printing, or
copying of this email is strictly prohibited. No warranties or assurances are
made in relation to the safety and content of this e-mail and any attachments.
No liability is accepted for any consequences arising from it. Findel Plc
reserves the right to monitor all e-mail communications through its internal
and external networks. If you have received this email in error please notify
our IT helpdesk on +44(0) 1254 303030<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:9.0pt'><o:p> </o:p></span></p>

</body>
</html>