http://adocious.freeshell.org/filesize.html
Het scriptje uit de bovenstaande link kan je aanpassen zoals strFile, strSize en AlarmSize..
Tussen het IF THEN en END IF statement zet je dan het scriptdeel dat de e-mail moet sturen.
bv. onderstaande..
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
| Dim ToAddress (20)
Dim MessageSubject
Dim MessageBody
Dim MessageAttachment
Dim ol, ns, newMail
ToAddress (1) = "Haha@hi.nl"
ToAddress (2) = "Hoho@ha.nl"
ToAddress (3) = "Hihi@ho.nl"
MessageSubject = "NoReply-Test"
MessageBody = "This is an automated E-mail see attachment for Details."
'MessageAttachment = ""
' connect to Outlook
Set ol = WScript.CreateObject("Outlook.Application")
Set ns = ol.getNamespace("MAPI")
For N=1 to 3
Set newMail = ol.CreateItem(olMailItem)
newMail.Subject = MessageSubject
newMail.Body = MessageBody & vbCrLf
' validate the recipient, just in case...
Set myRecipient = ns.CreateRecipient(ToAddress (N))
myRecipient.Resolve
If Not myRecipient.Resolved Then
MsgBox "Unknown recipient"
Else
newMail.Recipients.Add(ToAddress (N))
'newMail.Attachments.Add(MessageAttachment).Displayname = "Check this out"
newMail.Send
End If
NEXT
SET OL = NOTHING |
dim ToAddress(20) geeft je ruimte voor 20 recipients
of
http://searchexchange.tec...,sid43_gci1017045,00.html
Ps..Maar indien dit allemaal intern op hetzelfde netwerk blijft kan je volstaan met gebruik van windows Alerter service (Perfmon.msc-Action-New Alert setting) en hoef je niet persé te e-mailen.
Dan zal je denk ik die file wel zijn eigen kleine partitie moeten geven en kan perfmon die uitlezen en een alert over het net sturen bij het bereiken van een opgegeven grootte. Weet niet zeker of perfmon ook file of folder size aankan..(Dacht niet)