I think On windows 2000 or later, it is possible to receive notification of
changes to a folder using explorer shell. Sorry I don't know how, you may
want to look that up in google.com or msdn
Another way would be using timer event of 15 minute interval ( something
like a loop with Wscript.Sleep 15000
), and check for all files in the folder older than 15 mindute ( (current
date time - modified date time) > 15 minute). how to check for files and
their attributes? see file system object under collections of folders and
files
here is some pseudo code
' setup fso
' go to
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/scri...
' click on the left pane Script RunTime, FileSystem Object
Set fso = CreateObject("Scripting.FileSystemObject")
' also set up the folder object ftpFoldr
ftpFoldr=fso.GetFolder("yourFTPfolderspec");
while true
Wscript.Sleep 15000
fc = new Enumerator(ftpFoldr.files);
s = "";
for (; !fc.atEnd(); fc.moveNext())
{
if ( now() - fc.item().DateCreated > 15 minute) then ' note that I
used pseduo code for time diference
' you should look up Now(),
'
' DateAdd Function Returns a date to which a specified time
interval has been added.
' DateDiff Function
' etc
mailto .... ' again you have to look this up
loop
loop Returns the number of intervals between two dates.
s += "<br>";
}
I know one way for getting the vbs script help and reference lcoally on
your PC is
windows start, programs, microsoft windows script, windows script 5.6
documentation
(the last part may have a different version for you if you don't run XP)
Failing that
open word xp , tools, macro, script editor and then F1 key, finally vbs
script help.
failing that use msdn or google search. on the internet.
Quote:
> I am hoping someone could help me with this. I need a script that will do
> the following:
> I need to setup monitoring of a fileupload directory for files that
exceed
> a threshold of time existing without being processed every 15 minutes. If
a
> file is in this folder longer than 15 min I want to send an email to
someone
> using sendmail or some other appropriate means.
> The background of this is that we have a folder that recieves files then
> another process pushes these files out. If a file is in this folder
longer
> than 15 min there is a problem and usually a build up of files
accumulates.
> We want a sort of early warning system.. Any help here would be greatly
> appriciated.
> Bob