As a followup to this here is what I have come up with by mangling a couple scripts together to get somewhat of where I want to go with it.

First, the script gets a directory listing and outputs that to a file with the name of the file along with the date. Next it checks the count of the files in the directory to see if it has changed. Based on change or no change it sends off an email with the output of the directory listing and then updates the file count for that directory.


;----------- Change status-file to current times for Directory List ------------------------

$IniFile = Dir($workingdir + "\*.*")
While $IniFile <> "" And @Error = 0
$NewTime = GetFileTime($workingdir + "\" + $IniFile)
$
$Err = WriteProfileString($StatusFile, "FileTime", $IniFile, $NewTime)
$IniFile = Dir()
Loop

;---------------Check Count to determine if email needs to be sent---------------------------

$readdir=DIR($workingdir + "\*.*")
$contents=($rootdir + "\count.txt")
$loopctr=0
$adminmachine = "admin1"


While $readdir <> "" and @ERROR = 0
$loopctr=$loopctr+1
$readdir=Dir()
Loop


;-----------compare the current number of directories to the last reported number-------------

$oldcount=readprofilestring($contents,"Dir_Count","@wksta")
;$oldcount=$oldcount-2

;------------if there's a difference, send a message------------------------------------------

if $loopctr<>$oldcount
$=sendmessage("$adminmachine","The dir count on @wksta has changed from $oldcount to $loopctr")
? " dir count on @wksta has changed from $oldcount to $loopctr"
shell "blat.exe $rootdir\inistatus.txt -t user@mail.com -server smtp.mail.com -s subject -f user2@mail.com -noh2 -q"
$=writeprofilestring($contents,"Dir_Count","@wksta","$loopctr")
endif

;------------Cleanup--------------------------------------------------------------------------

del $statusfile

One of the things I would like to do is add filesize into the directory listing, and then change the email around to be more like a form to include disclaimers and the following:

Project Number: XXXXXX
Project Name : XXXXXXXXXXX
File Name : Filename.zip
File Size : Size in bytes
Transfer Date : Long date


Project # and Name would be static variables per directory folder, but File name, size, and date would need to be pulled for each file.

One of my problems however is this script obviously has to be scheduled to run, therefore what if the script runs while a file is being uploaded....obviously it will read the filesize of it at exactly that moment (before it is done) and report the incorrect FINAL size. Is there a way to tell if a file is open/still being completed so that it doesn't give a fales positive until it is acutally completed ?