LSTSRV-L Archives

LISTSERV Site Administrators' Forum

LSTSRV-L

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Topic: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Claude Etienne <[log in to unmask]>
Thu, 23 Oct 2003 16:22:10 -0400
text/plain (83 lines)
You should be able to use your system changelog to find out that information
by searching for the list name from the bottom up.  That should give you the
date and time of the last time mail was posted to the list.  If you
periodically archive your system changelog, you can either combine all the
archive files (or all up to the date that determines a list is too old) into
one file or search each file individually starting with the most recent.  If
you have too many lists and the tasks seems tedious, use the script below
assuming you're on a windows platform or translate it into another language
if you're not.

*******************************last_post.vbs*****************************
Get_stats

sub Get_stats()
Dim Fldr, file, sfile
Dim sFirst
Dim last_time
Dim fso, sfso, f, MyFile

Set fso = CreateObject("Scripting.FileSystemObject")
set fldr = fso.getfolder("C:\LISTSERV\MAIN")
set f = fldr.files

for each file in f
    If Instr(file.name, ".LIST") > 0 then
        sFile = Left(file.name, Instr(file.name,".") - 1)

      Set sfso = CreateObject("Scripting.FileSystemObject")
      Set MyFile =
sfso.OpenTextFile("C:\LISTSERV\MAIN\system.changelog",1,false,0)
        last_time = ""
           DO While not MyFile.AtEndofLine = True
                sFirst = MyFile.ReadLine
               If Instr(sFirst, sFile) > 0 then
                     last_time = left(sfirst,instr(sfirst," ") - 1)
                End if
           LOOP
       If last_time <> "" then
            WriteToLog sFile, last_time
       Else
            WriteToLog sFile, "Too Old"
       End if
       MyFile.close
        set MyFile = nothing
       set sfso = nothing
    End if
next
set fso = nothing
set fldr = nothing
set file = nothing
set f = nothing
End Sub

Sub WriteToLOg(list,ls_dt)
Dim MyFileWrite,sLog
Set logfs = CreateObject("Scripting.FileSystemObject")
  Set MyFileWrite = Logfs.OpenTextFile("c:\Temp\liststat.log", 8, True )
  MyFileWrite.Write list & Chr(9) & ls_dt & vbcrlf
End Sub

****************************************************************************
****

Claude.

----- Original Message -----
From: "Sean Yo" <[log in to unmask]>
To: <[log in to unmask]>
Sent: Thursday, October 23, 2003 10:57 AM
Subject: Last use of list query


> Is there an easy way to check when the last time a list was used (i.e. a
> message was sent to the list) under 1.8d?
> I'm in the process of moving over to 1.8e, on new hardware.  Before I
> migrate lists over to the new box, I'd like to reduce the number of
> lists I need to migrate by culling deadwood..
>
> Any thoughts on how to accomplish this?
>
> Cheers
> Sean

ATOM RSS1 RSS2