MGSUDEL
============================
Version 1.51 - March 7, 1992
Telegard User File Delete Utility
for Telegard 2.7 systems ONLY!!
=== ======
WARNING!! WARNING!! WARNING!! WARNING!!
Use of this utility on 2.5i/k systems will DESTROY your USER.LST file.
For 2.5i/k systems please obtain MGSUD100.ZIP and use that program instead!
Mt. Glacier Software
Copyright (c) 1992 by Michael G. Smith
All rights reserved.
Latest version and Support available on my bbs:
The Twilight Zone
Telegard Connecticut State Center Support Site (ex-, I guess)
(203)688-0675
FidoNet 1:142/550
USTGNET 85:861/101
1200/2400/14.4K/V.32 HST Dual Standard
(FREQ magic name MGSUDEL for latest version)
Purpose
=======
This utility program deletes users from your USER.LST file that haven't
called your system in a set amount of time. Currently, the criteria for
deletion is fixed (see below).
Warranty
========
This product is provided "as is" without warranty of any kind. The entire
risk as to the results and performance of the program is assumed by you.
Furthermore, the author does not warrant, guarantee, or make any other
representations regarding the use of, or the results of the use of the
program, and you rely on the program and results solely at your own
risk. The author cannot and will not accept responsibility for system
damage, loss of profit, or any other special, consequential or incidental
damages resulting from the use or inability to use this product.
Copyright
=========
MGSUDEL is Copyright (c) 1992 Mt. Glacier Software by Michael G. Smith.
It is distributed as Freeware. You are encouraged to use this utility
free of charge. Any comments/feedback/suggestions would be gladly
accepted (see Support section below).
Distribution
============
You are encouraged to distribute MGSUDEL provided that all files contained
in the archive are distributed in their original and unmodified state.
No fee is to be charged above a normal minimal distribution fee.
Description
===========
MGSUDEL is a little utility program I wrote to clean up my own USER.LST
file. I was approaching 1000 users, and an analysis showed that many of
the users had called only once(!), or two to three times. Other users
had not called in over a year.
Other "delete" programs are available, but none fit my particular need.
And I felt like doing a little coding <grin>. In its present state, the
criteria for deleting a user from the file is fixed and rather arbitrary
(remember it was to fit *my* particular needs).
Users are deleted as follows:
- Users not logged on in over 365 days.
- Users who have called <= 3 times, and haven't logged on in 90 days.
- Users who have called <= 1 time, and haven't logged on in 30 days.
- Users with the AC flag "Protection from Deletion" set will NOT be
deleted.
- Users who are "Locked Out" will NOT be deleted.
- Users who are already "Deleted" will NOT be RE-deleted.
MGSUDEL by default creates a complete LOG file of its activities. This
file is appended for each execution of the utility allowing you to track
activity over time. The LOG file is named MGSUDEL.LOG and is placed in
the Telegard main directory. It may be suppressed by using the "NOLOG"
execution parameter (see below). Note: The utility also displays
informative console messages about processing activity and totals.
MGSUDEL by default does not create a backup of the original USER.LST file.
During processing, it creates a copy of the USER.LST file, flagging users
as deleted as they meet the qualifications. At completion, the original
USER.LST is deleted and the copy is renamed to USER.LST. If desired, the
original USER.LST file can be retained as USER.BAK by specifying the
"BACKUP" execution parameter (see below). IMPORTANT NOTE: Regardless of
which whether "BACKUP" is specified, there must be at least enough free
disk space available to create a duplicate of the original USER.LST file!
MGSUDEL also allows a non-update Estimate Mode processing run. This mode
of execution does NOT update the USER.LST file. It creates an output file
named MGSUDEL.EST that will contain the LOG file entries showing users
that would be deleted. It is a good way to see just what will happen
when you run it "for real". Highly recommended the FIRST time you run
this utility, to allow you to examine who will deleted and perhaps set
the Protection from Deletion flag for any you wish to not be deleted.
Important Notes
===============
MGSUDEL does not adjust the NAMES.LST file which is a problem as deleted
users will still be able to logon by name. I strongly recommend you run
Martin Pollard's utility program NAMEFIX to cleanup the NAMES.LST file.
This utility is available in the current archive containing the 2.5p+
code, or from my bbs, or many other Telegard support boards.
MGSUDEL does not delete any mail or voting records for users it deletes.
I recommend you run Martin Pollard's utility DELEMAIL to delete orphaned
mail. Again, this utility is included with the TG 2.5p+ archive currently,
or can be acquired from my bbs or many other Telegard support boards. The
problem of old voting records (in VOTING.DAT) is just that - a problem. I
do not know of a utility (currently) that will cleanup this file.
Usage
=====
MGSUDEL *must* be run from the main Telegard directory (where STATUS.DAT
resides) in order to locate the files it requires to execute. Successful
completion returns a zero condition code, any errors will produce a non-
zero return code.
MGSUDEL accepts three command line parameters, one of which is required.
Command format is:
MGSUDEL PROCESS|ESTIMATE [NOBACKUP|BACKUP] [LOG|NOLOG]
Where:
PROCESS|ESTIMATE - ONE of these parameters are REQUIRED for execution.
If neither is specified, a command format screen
is displayed.
PROCESS indicates that the USER.LST file should be
processed and users deleted according to the above
deletion criteria. At successful completion, the
USER.LST file will be updated.
ESTIMATE indicates that the USER.LST file should be
processed and users that *would* be deleted accord-
ing to the above deletion criteria will be recorded
in the file MGSUDEL.EST. NO updating of the USER.
LST file will take place.
NOBACKUP|BACKUP - Optional parameter. If not specified, NOBACKUP is
the default option. Note: not applicable to ESTIMATE
mode processing, and if specified will be ignored.
NOBACKUP indicates that at successful completion,
the original USER.LST file is deleted, and the newly
created USER.L$T file is renamed to USER.LST.
BACKUP indicates that at successful completion, the
original USER.LST file is NOT deleted, but is first
renamed to USER.BAK prior to the newly created
USER.L$T file being renamed to USER.LST.
LOG|NOLOG - Optional parameter. If not specified, LOG is the
default option. Note: not applicable to ESTIMATE
mode processing, and if specified will be ignored.
LOG indicates that processing will create a history
log file named MGSUDEL.LOG in the main Telegard
directory. This file is appended for each execution
and contains a listing of all deleted users, a date
and time stamp, and processing totals.
NOLOG suppresses the history log file append. Note
console displays will not be suppressed by use of
this option. To suppress console displays, simply
redirect output to NUL (append "> NUL" to command
line.
MGSUDEL Version 1.50 Files List
===============================
MGSUDEL.EXE MGSUDEL executable program
MGSUDEL.HST MGSUDEL change history documentation
MGSUDEL.DOC MGSUDEL complete documentation (This file)
SAMPLE.LOG Sample output LOG file
SAMPLE.EST Sample output EST file
ErrorLevels
===========
0 = Normal completion.
4 = Invalid or Missing Parameters
8 = Error Opening or Reading STATUS.DAT File
12 = Error Opening or Writing Audit File (MSGUDEL.LOG or MGSUDEL.EST)
16 = Error Opening or Reading USER.LST Input File
20 = Error Opening or Writing USER.L$T Output File
Support
=======
I can be reached at the following for support/questions/suggestions about
this utility (listed in my preferred order):
FIDO: 1:142/550 (FREQ magic name MGSUDEL for latest version)
USTGNET: 85:861/101 (FREQ magic name MGSUDEL for latest version)
Use NetMail for fastest reply.
BBS: The Twilight Zone
Telegard Connecticut State Center Support Site (ex-)
(203)688-0675 1200/2400/14.4K/V.32 HST Dual Standard
U.S. Mail: Michael G. Smith
14 Oxford Lane
Windsor, CT 06095
Phone: Sorry. No voice support available.
History
=======
Version
-------
1.00 Initial Release. Deletion limited to fixed internal criteria.
1.01 Minor Bug fix for USER.LST with 20 or less user records.
1.50 Revised for Telegard version 2.5p+ to accomodate major changes
in the USER.LST file. Added color to displayed text.
1.51 Coded around a bug in Borlands MKTIME function when processing
a user who had last logged on on leap day (02/29/92). *sigh*
Futures and Enhancements
========================
Well, that all depends. If I get some positive feedback on this utility,
I will probably enhance it. If not, well, it does what I want now...
- The most obvious enhancement would be the ability to specify your own
deletion criteria. I envision a .CFG file with some sort of rules based
input criteria.
- Other input parameters could be accepted from a .CFG file as well.
- Ability to do USER.LST compression, that is, drop the users from the
file completely and recover the space. I would envision a parameter
that would limit the compression to start from a particular user number.
This would seem especially desirable as the ZSCAN.DAT information (with
high message pointers) is now stored in USER.LST. My USER.LST is over
2 megs now!!
- Ability to natively do related file cleanup. This includes: NAMES.LST,
SHORTMSG.DAT, EMAIL, and VOTING.DAT files. I might approach the
VOTING.DAT file as a separate utility.
Other Mt. Glacier Software Telegard Utilities
=============================================
MGSFLOFF - A .DIR file offliner. This handy utility lets you "split
out" files that are "offline" (i.e no longer on disk) into
separate .DIR files. This keeps your online dirs smaller,
and lets users toggle off the offline areas in their New
Scans. FREQ MGSFLOFF from 1:142/550 or 85:861/101 or look for
MGSFOnnn.ZIP on your favorite Telegard support board.
MGSULL - A User Uploads Lister for Telegard. Lists all uploads for a
specified user. Usable online or offline. Very handy! For
TG 2.7 systems. FREQ MGSULL from 1:142/550 or 85:861/101 or
look for MGSULnnn.ZIP on your favorite Telegard support board.
-= End of MGSUDEL.DOC file =-