Okay 20 minutes after this post a programmer stopped by.
sub recurse( byref folders)
Set regEx = New RegExp
regEx.Pattern = "\.processed$"
regEx.IgnoreCase = True
set files = folders.files
wscript.echo ""
wscript.echo "Deleting Files under the Folder:" & folders.path
wscript.echo
"__________________________________________________________________________"
for each file in files
if regex.test(file.name) and file.datelastmodified < newdate then
wscript.echo "Deleting " & folders.path & "\" & file.name & " last
modified: " & file.datelastmodified
on error resume next
file.delete
end if
next
It worked.
"Stacey" wrote:
> First I am not a programmer. I have done a little scripting.
>
> Here is the problem:
>
>
> Ha a program that creates log files Audit1.log, audit2.log ect. in c:\logs
> . Another program comes along and reads the file into its database and
> renames the file audit1.log.proccessed.
>
> I have tried to write a script that will delete any files with .processed
> but it will not work. I belive the problem is that it reads from left to
> right and sees the .log only.
>
> Any ideas?
>
> Thank you