(Please set Notepad to Word Wrap)

============================================
WCLOGDEL 1.2 (c)1999 Sintraweb, Lda - 32bits
Tested under Windows 95 and NT 4.0 wkst. SP3
and Winserver v.5.3.447 (www.santronics.com)
============================================
* Freeware *

.NOTES FOR THE USERS OF THE FORMER VERSION LOGDEL 0.15b
Please replace LOGDEL.EXE by WCLOGDEL.EXE and README.TXT by this text file.
In order to keep your current configuration, be sure that the old LOGDEL.INI is in the same directory where you are going to install and run this new version - default is \LOGDEL. Read HISTORY for new features and details.
Don't forget to read TIPS.

.NOTES FOR THE USERS OF PRIOR WCLOGDEL VERSIONS
By default the program will install itself in \LOGDEL and overwrite the files WCLOGDEL.EXE and README.TXT. The default installation will preserve existing configurations in LOGDEL.INI. If you don't accept the default installation, be sure to replace WCLOGDEL.EXE and README.TXT by the latest versions. In order to keep your current configuration, be sure that the old LOGDEL.INI is in the same directory where you are going to run this new version.
Read HISTORY for new features and details. Don't forget to read TIPS.

.HISTORY

Version 1.2 (this one)
- Added more control to the # of the File Definition. Clicking 'Save' with the File Definition # equal to zero is not allowed anymore. Under certain rare circumstances this would make the program not working properly (thanks Carlos Cerveira) unless you delete the file LOGDEL.INI and enter your configuration again.

Version 1.1
- Added a Style button in the File Definition panel in order to configure the  Special Log Format. You don't need anymore to set the size limit to 1, 2 or 3 bytes if you want to control logfiles of the format *YYYYMMDD.LOG aged of 1, 2 or 3 days. Now you only have to choose Style.
- Fixed a bug where the Special Log Format only worked in the first run of the program (this bug doesn't exist in the former LogDel 0.15b).

Version 1.0
- Added configuration panels. Less tricky to configure. All features remain the same of the prior beta version.

Version 0.15b
- First public beta under the former name LOGDEL 0.15b. No bugs found but very tricky to configure. 

.READ THIS NOW!
THIS IS A FREEWARE PROGRAM THAT WILL DELETE FILES FROM YOUR HARD DRIVE!
BACKUP YOUR FILES, DO SOME TESTING AND TRY TO UNDERSTAND HOW IT WORKS BEFORE YOU USE IT!

.WARRANTY
THIS FREE SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, WITHOUT LIMITATION, ANY WARRANTY OF FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SINTRAWEB, LDA BE LIABLE FOR ANY DIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THIS SOFTWARE.

.DISTRIBUTION
wcLogDel may be distributed freely without charge. The original zipped file is the preferred method.

.WHAT IS IT?
wcLogDel is our simple attempt to get rid of some log files that are growing everyday on our server hard drives. wcLogDel was written to control the Winserver logs but it can control and delete any type of files based on its size and, in same cases, on its date. It can do the job in a scheduled event.

.HOT IT WORKS
wcLogDel reads its configuration file and gets the definition of the files we  want to control, including files that change their names everyday (like wcmail19991127.log which we call here as Special Log Format files).
Then it compares the size of these files with the size limit that we have previously set for each file.
If the file is bigger than the size limit, then the file is deleted.
If the size limit is '0' (zero), then the file is always deleted.
If the file matches the defined Special Log Format it will be deleted.
If the file doesn't exist, there is no problem.
Everything will be reported in the window program (if you're not using the Command Line option) and in the wcLogDel logfile. That's it.

.INSTALLATION
Unzip WCLOGDEL.ZIP to a temporary directory. Run the file WCLOGDEL.EXE.
By defaul, the directory \LOGDEL will be created and the files WCLOGDEL.EXE and README.TXT will be extracted into it. LOGDEL.LOG and LOGDEL.INI will be created in the same directory when you run the program for the first time.
If a LOGDEL.INI file is already in the install directory it will be used.

.CONFIGURATION
You can control up to 15 logfiles (see TIPS if you have more than 15 files to control).

Settings are entered from the two panels in the bottom of the window.

In the Number of Files to Control panel, indicate:

-> The number of files to be controled (1 to 15)
(click OK to save the changes)

In Change File Definition panel, indicate:

-> The File Definition you want to change (1 to 15)
-> The Size Limit in bytes (ex.: 50000)
-> Full Pathname (ex.: c:\directory\filename.ext)
-> The Style of the file name you want to change (0 to 3, zero is 'normal')
(click SAVE to save the changes)

Note: You only need to define the Style if using the Special Log Format.

.SPECIAL LOG FORMAT - STYLE
Sometimes you have a logfile that changes its name everyday because it includes the current date in the name. One example is the wcsmtp19991023.log or wcmail19991025.log, respectively for Oct.23.1999 and Oct.25.1999, both produced by Winserver 5.3 smtp and mail programs.

In order to force wcLogDel to control this kind of files, you need to do 2 things:

- Define the filename equal to the UNCHANGING_PART_OF_THE_NAME
- Define the Style equal to 1, 2 or 3 (see later when)

wcLogDel will add the 'date part' and the extension '.log' and set the size limit to '0' (zero).

Now, what date will wcLogDel add to the File Definition? It depends on the Style you have chosen. Sure you don't want today's log to be deleted so wcLogDel lets you keep the latest 3, 2 or 1 day(s) log(s).

Using the example of the wcsmtYYYYMMDD.log, you would define:

Full Pathname equal to 'c:\wc5\wcsmtp'

and Style equal to 1, 2 or 3 if you want wcLogDel to delete the logs aged respectively of 1, 2 or 3 days.

In October, 23, 1999 wcLogDel would control:

c:\wc5\wcsmtp19991022.log - if Style equal to 1
c:\wc5\wcsmtp19991021.log - if Style equal to 2
c:\wc5\wcsmtp19991020.log - if Style equal to 3

This way you can always keep this kind of logs aged of 1, 2 or 3 days and have the older ones deleted.

.LOGDEL.LOG
wcLogDel creates its own logfile which you can open from the program or have it shortcuted to your desktop. This is the logfile and talks for itself:

---------------------------------------------------------------------
# 28/11/1999 - 00:30:04     (C=Created, D=Deleted, N=Not found, O=OK)
---------------------------------------------------------------------
C - Logfile: .\LOGDEL.LOG (size limit: 100000 bytes)
O - File #1: c:\wc5\gateway\uucico (32241/50000 bytes)
O - File #2: c:\pxw\nltools\nltool.log (995/100000 bytes)
O - File #3: c:\wc5\wcNNTP.log (3963/100000 bytes)
O - File #4: c:\wc5\wchttp.log (2301/100000 bytes)
N - File #5: c:\pxw\nltools\nl900.log (0/50000 bytes)
N - File #6: c:\pxw\nltools\nl910.log (0/50000 bytes)
O - File #7: c:\wc5\activity.3 (26885/100000 bytes)
D - File #8: c:\wc5\wcsmtp19991127.log (54873/0 bytes)
D - File #9: c:\wc5\wcmail19991127.log (159280/0 bytes)
D - File #10: c:\test\test.txt (10328610/10000000 bytes)
---------------------------------------------------------------------

By default the log will be saved in the same directory of wcLogDel but you can edit the LOGDEL.INI file and change its location. It's a good idea to keep LOGDEL.LOG in the same directory of WCLOGDEL.EXE so that you can read this logfile from the program itself.

LOGDEL.LOG will also be deleted and recreated when its size grows up to 100000 bytes but, once again, you can change this value in the LOGDEL.INI file, being 'L' the fullpathname and 'S' the maximum length of the LOGDEL.LOG. Look for the section [Log] in LOGDEL.INI as follows:

[Log]
L=.\LOGDEL.LOG
S=100000

.MODES (Local, Test and Auto)
wcLogDel can run with or without command line parameters:

In Local mode (no parameters) you are presented with a window screen where you can see what's going on. From there you can change the Number of Files to Control, the File Definition and Style and you can view the INI file, the Logfile and the Readme with Notepad.

In Test mode (parameter /T or /t) everything is similar to Local mode except that wcLogDel will NOT DELETE any file.

In Auto mode (parameter /A or /a) there will be no window and you'll have to look into the LOGDEL.LOG file to see what was done. This mode is what you must use if you are going to run wcLogDel in a scheduled event.

.TIPS
- MORE THAN 15 FILES
If you have more than 15 files to control, just install a second copy of the program in a different directory with a different configuration.
- NETWORK
If some or all of the files you want to control are in a network, all you have to do is to map the other machine(s) drive(s) to the machine where wcLogel is running.
- REPORTS BY E-MAIL OR NETMAIL
If you want to receive by e-Mail or Netmail the log of wcLogDel everytime it runs, all you have to do is to edit the file LOGDEL.INI and set the logsize limit to 0 (S=0 in the [Log] section). Then run any utility capable of sending e-Mail or Netmail. Examples of these utilities are Sendmail, wSendmail (http://home.sol.no/jgaa/) or PxSend from Santronics.
Configure it to send the textfile LOGDEL.LOG. You must run the utility after running wcLogDel and before it runs again. With its own log sizelimit equal to zero, wcLogDel will delete the old log and create a new one everytime it runs.

Example batchfiles using WSendmail and PXSend:

---BEGIN LOGREPEMAIL.BAT---
@echo off
cd\LOGDEL
wcLogDel /a
cd\wsendmail
wSendmail  -v "-sLogDel Report" -fYou@domain You@domain C:\logdel\logdel.log
---END LOGREPEMAIL.BAT---

---BEGIN LOGREPNETMAIL.BAT---
@echo off
cd\LOGDEL
wcLogDel /a
cd\pxw
PXSEND 2:362/9 /N /M C:\LOGDEL\LOGDEL.LOG /S wcLogDel Report
---END LOGREPNETMAIL.BAT---

.READ AGAIN
As stated before, you MUST NOT run wcLogDel over original files without testing first over copies of those files. wcLogDel deletes files forever not to the Recycle Bin. You are at your own risk. There are no warranties.

.SUPPORT
We think the program is easy to use but you can send questions and report bugs (please) to sysop@sintraweb.pt. Thanks.

===
Artur Madeira
Sintraweb, Lda - Portugal
www.sintraweb.pt
===

