(Please set Notepad to Word Wrap)

============================================
WCLOGDEL 1.4 (c)2000 Sintraweb, Lda - 32bits
DELETE, COMPRESS, VIEW AND CONTROL LOGFILES
Tested under Windows 95 and NT 4.0 wkst. SP3
and Winserver v.5.3.448 (www.santronics.com)
============================================
* Freeware *


.IMPORTANT NOTES FOR THE USERS OF PRIOR VERSIONS

* Users of version 1.3 or greater:

- Before you install a new WcLogDel version, please do the follwoing:

1. Backup WcLogDel folder and all its files to a safe place
2. Uninstall WcLogDel using the Uninstall option

- After that you can:

1. Extract the new distribution zip file to a temporary folder
2. Install the new version running the Setup.exe
3. Copy your old WCLOGDEL.INI and every FILEnn.ZIP to the WCLOGDEL folder
4. Run the new version

This will preserve existing configurations.

* Users of any version prior to 1.3:

- WcLogDel will now be installed in \WCLOGDEL instead of \LOGDEL
- The WcLogDel logfile name is now WCLOGDEL.LOG instead of LOGDEL.LOG
- The WcLogDel inifile name is now WCLOGDEL.INI instead of LOGDEL.INI

If you want to preserve existing settings from an old LOGDEL.INI, just
rename it to WCLOGDEL.INI and PUT it in the new program folder (\WCLOGDEL).

* New and old users:

Read HISTORY for NEW FEATURES, bug fix and details and don't forget to read the TIPS section.


.HISTORY

Version 1.4 (current one - Mar/31/2000)

- Added a View button that allows you to open any configured logfile or ANY OTHER configured file using its Windows associated program.
- Added the Alarm style (Style 6) that will put in the desktop a red alert window when a file configured to ALARM surpasses the Size Limit. The red alert window will tell you the file definition number and its current size.
- Changed the Readme.txt Help file.
- Changed the HTMLHelp file (same contents of Readme.txt).

Version 1.3

- Added ZIP/compress capacity using external archive programs.
- Extended the number of files that WcLogDel can control from 15 to 30.
- Added automatic installation (setup.exe).
- Changed the Readme.txt Help file.
- Added external Help in format HTMLHelp (same contents of Readme.txt).
- Changed LOGDEL.INI to WCLOGDEL.INI and LOGDEL.LOG to WCLOGDEL.LOG

Version 1.2

- 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 in the original zipped file.


.FEATURES

WcLogDel is our simple attempt to get rid and control the log files that are growing everyday on our server hard drives. WcLogDel was written to control the Winserver logs but it can be used with ANY type of files.

WcLogDel can delete, compress, view and control any type of files based on its size and, in same cases, on its date. It can do the job in a scheduled event running in the background (we use it that way) and also be used as a limited backup solution.


.HOW 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 (example: the Winserver wcmailyyyymmdd.log logfile) which we call here as Special Log Format files. WcLogDel compares the size of these files with the size limit that we have previously set for each file and then does the following:

- If the file is bigger than the size limit, then the file is deleted (Style 0)
- If the file matches the Special Log Format (Styles 1 to 4) or is configured as Style 5 or 6 it can be deleted, compressed, compressed & deleted or have a red alert sent to your desktop.

Everything will be reported in the WcLogDel window (if you're not running it in the background - Command Line option) and in the WcLogDel logfile. From the program you can also open and view/edit any of the configured logfiles or other files.


.INSTALL

Unzip WCLOGDnn.ZIP (nn is the version number) to a temporary directory and run the file SETUP.EXE. Later you can delete WCLOGDnn.ZIP and SETUP.EXE.
By default, the directory \WCLOGDEL will be created and all the necessary files will be extracted into it. WCLOGDEL will be available from a shortcut in Start>Programs>WcLogDel. There are no Registry changes and the only INI file used is the one you can find in WcLogDel directory.


.UNINSTALL

Go to Start>Programs>WcLogDel and click Uninstall WcLogDel.
Everything will be deleted except the folder \WCLOGDEL and the files WCLOGDEL.LOG and any archive file contained in it if you have used the ZIP/Compress feature.


.CONFIGURATION

You can control up to 30 files (logfiles or any other files) and tell the program to delete or compress them or send an alert to the desktop if they match a "special logfile format" or if they are bigger than x bytes.

To compress the files you need an external archiver program to be located in the Path of your computer or in the folder where WcLogDel is installed (default is \WCLOGDEL).
You can use any archiver that accepts to be called from a command line. We found Wzzip, the "Winzip Command Line Add-on" perfect for this purpose but you can use any other like the old and free Zip 2.0.1 which we include in the packet. See archiving options in the COMPRESSION section.

If you are using Winserver, you can instruct WcLogDel to delete the WcMail and WcSMTP logfiles (wcmailyyyymmdd.log and wcsmtpyyyymmdd.log files) aged of 1, 2 or 3 days or compress and delete (or only compress) these same files but aged of 1 day only. This means you can get rid of these log files keeping the latest ones (with one, two or three days) or have them daily compressed inside a single archive file where you can inspect them whenever you want. 

You can also have WcLogDel compressing (and deleting or not) any other file based on its size.

Please remember that you have to close and restart the application to see the results of new settings that you have entered. You can run WcLogDel in Test Mode ( call it with /T) to see these results in the program window or in the log (WCLOGDEL.LOG) without having the files deleted or compressed.

Settings are entered from the 2 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 30)

(click OK to save the changes)

Note: You can have this number always settled to 30 but if you only want to control a few files, you'll speed up things if you put there the exact number of files you want to be controlled. WcLogDel will check the files starting in File 1 and ending in the File number you define as Number of Files to Control. Empty File definitions are accepted. File Definiton numbers above the Number of Files to Control are accepted too. WcLogDel will not read or test these kind of entries.

* In Change File Definition panel, indicate:

-> The File Definition # you want to change/set (1 to 30)
-> The Size Limit in bytes (ex.: 50000, if Style=1, 2 3 or 4 defaults to 0)
-> Full Pathname (ex.: c:\directory\filename.ext, w/o extension if Style=1, 2, 3, 4)
-> The Style of the file name you want to change (0 to 6, zero is 'STANDARD')

(click SAVE to save the changes)

Note: You only need to define Styles when...
- you want to control files in the Special Log Format "whateveryyyymmdd.log" and have them deleted, compressed or both;
- you want standard files to be simply compressed, deleted or both;
- you want to receive an alert when a file surpasses some size.

If you only want a file deleted when found then let the default Style=0.
See next how to use Styles.


.SPECIAL LOG FORMAT

- Styles 1, 2 and 3 (delete whateveryyyymmdd.log files - 1, 2 or 3 days old)

Sometimes you have a logfile that changes its name everyday because it includes the current date in the name. One example is the wcsmtp20000303.log or wcmail20000303.log, respectively for Mar.03.2000 and Mar.03.2000, both produced by Winserver 5.3 Wcsmtp and Wcmail 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 w/o extension
- Define the Style equal to 1, 2, 3 or 4 (see later when)

WcLogDel will add to your enter (ex: c:\wc5\wcmail) the 'YYYYMMDD' and the extension '.log' and set the size limit to '0' (it will be zero even if you enter another size limit). 

You may be asking now, "what date will WcLogDel add to the File Definition?" It depends on the Style you have chosen. WcLogDel lets you keep the latest 3, 2 or 1 day(s) log(s).

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

- Full Pathname equal to 'c:\wc5\wcsmtp'
- Style equal to 1, 2 or 3 if you want WcLogDel to delete the logs aged respectively of 1, 2 or 3 days.

Let's see these examples. In March, 23, 2000, WcLogDel would control and delete the files:

c:\wc5\wcsmtp20000322.log - if Style equal to 1
c:\wc5\wcsmtp20000321.log - if Style equal to 2
c:\wc5\wcsmtp20000320.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. But you may want these logfiles archived and then deleted. For that you have Style 4.

- Style 4 (compress and delete or not whateveryyyymmdd.log files - 1 day old)

We are still talking of Special Log Formats, i.e. files in the format "whateveryyyymmdd.log", like "wcsmtp20000320.log". Their File Definition is entered exactly in the same way we used for Style 1, 2 and 3. You define them as Style 4 if you want them compressed/archived. There is also another important difference: Style 4 will only consider files aged of 1 (one) day.

So, supposing that you want wcmailyyyymmdd.log (Winserver WcMail logfile) daily archived/compressed, you would define it like this:  

File Definition = c:\wc5\wcmail
Style = 4

With this settings, when WcLogdel runs it will look for the "yesterday wcmail logfile", compress it and add it to the file FILEnn.ZIP, where nn is the File Definition number. Day after day, WcLogdel will add this "yesterday log file" to the same FILEnn.ZIP. By default, the original logfile will be kept but you can have it deleted after the daily compression. See the next section (COMPRESSION) to know how to do it.

- Style 5 (compress and delete or not any kind of file - based on Size Limit)  

This is the ZIP/ARCHIVE style and you can apply it to any file. The file will be compressed when it grows up to a size in bytes pre-defined by you. If you want, it can be deleted after being archived (see how in the COMPRESSION section).

You configure WcLogDel for Style 5 the same way you would do to the default STANDARD Style (Style 0): set a File Definition, set the Size Limit and putStyle = 5.

- Style 6 (only sends an alert to your desktop)

This is the Alarm Style and the only thing it does is to send a red alert to your desktop when a file is bigger than its Size Limit.
This feature can be useful if you only want to be notified when some file (or files) grows up to a pre-defined size.


.COMPRESSION

As told in the CONFIGURATION section, you need an external archiver program that accepts to be called from a command line. We found Wzzip, the "Winzip Command Line Add-on", perfect for this purpose but you can use any other like the old and free Zip 2.0.1 which we include in this packet.

The compress program must be in the folder where WcLogDel was installed (default is \WCLOGDEL) or in a folder known by your system evironment variable "Path".

WcLogDel must know which archiver program can be used and the command line to invoque it. By default and installation it will be '.\zip.exe'. This compresses the original files you want to control but DOESN'T DELETE them.

If you want the original files to be deleted after compression, you need to edit the file WCLOGDEL.INI that exists in the same folder of WcLogDel and change the command line to '.\zip.exe -m' in the ini section [ZIP], field 'ProgName'. You can do that from WcLogDel pressing the button "View INI".

In this version and by default installation, all archives (*.ZIP or whatever extension your archiver produces) will be stored in the WcLogDel folder. See TIPS for an easy way of browsing the WcLogDel folder using the View button.

Compressed filenames will be FILEnn.ZIP, being 'nn' the Number of the File Definition and 'ZIP' the extension name your archiver produces.

Note: you can use any archiver program that accepts to be called from a Command Line. This means that you can use the features allowed by the archiver command line OPTIONS. For your information, this is the way how WcLogDel calls the external archiver defined in WCLOGDEL.INI:

RUN [ZIP definition in WCLOGDEL.INI] [FILEnn] [File_Definition]

Note: FILEnn is the target compressed file (w/o extension) and File_Definition is the source file to be compressed (drive, path, filename and extension).


.WCLOGDEL.LOG

WcLogDel creates its own logfile which you can open an view from the window program (press View Log) or have it shortcuted to your desktop. WCLOGDEL.LOG is very useful if you have more than 15 files to control because the window program only shows the first 15 files checked.

This is a standard logfile and talks for itself:

-----------------------------------------------------------------------------
31/03/2000 00:30:01 A=Alarm C=Created, D=Deleted, N=Not found, O=OK, Z=Zipped
-----------------------------------------------------------------------------
C - Logfile:   .\WCLOGDEL.LOG (size limited to: 50000 bytes)
D - File #1:  c:\wc5\gateway\uucico (83214/50000 bytes)
O - File #2:  c:\pxw\nltools\nltool.log (24050/50000 bytes)
O - File #3:  c:\wc5\wcNNTP.log (25495/50000 bytes)
O - File #4:  c:\wc5\wchttp.log (43883/50000 bytes)
O - File #5:  c:\pxw\nltools\nl900.log (21305/50000 bytes)
O - File #6:  c:\pxw\nltools\nl910.log (21305/50000 bytes)
Z - File #7:  c:\wc5\activity.3 (86097/50000 bytes)
Z - File #8:  c:\wc5\wcsmtp20000309.log (78413/0 bytes)
Z - File #9:  c:\wc5\wcmail20000309.log (206771/0 bytes)
O - File #10: c:\wc5\wildcat.log (15642/40000 bytes)
O - File #11: c:\wc5\wconline_sintraweb.log (219/50000 bytes)
O - File #12: c:\pxw\pxstart.log (3349/15000 bytes)
Z - File #13: c:\pxw\pxevt1.log (155/0 bytes)
O - File #14: c:\wc5\gateway\debug (0/50000 bytes)
O - File #15: c:\wclogdel\file9.zip (427351/2000000 bytes)
O - File #16: c:\wclogdel\file8.zip (76526/100000 bytes)
N - File #17:  (0/0 bytes)
N - File #18:  (0/0 bytes)
A - File #19: c:\artur\altreacao.txt (1011/0 bytes)
N - File #20:  (0/0 bytes)
N - File #21:  (0/0 bytes)
N - File #22:  (0/0 bytes)
N - File #23:  (0/0 bytes)
D - File #24: c:\test\test.txt (10328610/10000000 bytes)
N - File #25:  (0/0 bytes)
N - File #26:  (0/0 bytes)
N - File #27:  (0/0 bytes)
N - File #28:  (0/0 bytes)
N - File #29:  (0/0 bytes)
O - File #30: c:\artur\mylongfoldername\test.txt (1000/5000 bytes)
-----------------------------------------------------------------------------

By default, WCLOGDEL.LOG will be saved in the same directory of WcLogDel but you can edit WCLOGDEL.INI file and change its location. Do it with WcLogDel CLOSED! If you do it from the View Log in WcLogDel your changes wil not be accepted. It's a good idea to keep WCLOGDEL.LOG in the same directory of WCLOGDEL.EXE so that you can view this logfile from the program itself.

By default, WCLOGDEL.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 WCLOGDEL.INI file (with WcLogDel CLOSED!), being 'L' the fullpathname and 'S' the maximum size in bytes of the file WCLOGDEL.LOG.

To make any of the two INI changes mentioned above, look for the section [Log] in WCLOGDEL.INI as follows:

[Log]
L=.\WCLOGDEL.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 the results of the current run (the first 15 files only) and change the Number of Files to Control, add or change File Definitions and Styles and 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 OR COMPRESS any file.

In AUTO MODE (parameter /A or /a) the program runs in the background and you'll have to look into the WCLOGDEL.LOG file if you want to see what was done (except for the Alarm window that will pop if a size alarm occurs).
This mode is what you MUST use if you are going to run WcLogDel in a scheduled event, otherwise the program will stay open wayting for you to close it.

This is how we call it from our batchfile event:

cd\wclogdel
wclogdel.exe /a


.VIEW

The View button (the one with the "open folder" icon) allows you to open any of the configured files. Use the spin arrow in Change File Definition # to select the file you want to view and press the View button to open it with the Windows associated program.


.TIPS

- MORE THAN 30 FILES
If you have more than 30 files to control, just install and run 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 WcLogDel is running.
- VIEW ANY FOLDER
To view any folder using the View button, configure a File definition to DRIVE:\Directory (ex.: c:\WcLogdel) then press the View button. More: If you press the View button with File Definition equal to zero or from an empty file definition you will browse your root directory.
- 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/), REBOL (http://www.rebol.com) or PxSend from Santronics.
Configure the sendmail program to send the textfile WCLOGDEL.LOG. You must run the utility after running WcLogDel and before it runs again. With its own log size limited to zero, WcLogDel will delete the old log and create a new one everytime it runs.

Example batchfiles using WSendmail and PXSend:

---BEGIN WCLOGREPEMAIL.BAT---
@echo off
cd\WCLOGDEL
WcLogDel /a
cd\wsendmail
wSendmail  -v "-sWcLogDel Report" -fYou@domain You@domain |same line|							|same line| C:\wclogdel\wclogdel.log
---END WCLOGREPEMAIL.BAT---

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


.READ AGAIN

As stated before, you MUST NOT run WcLogDel over original files without testing it 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 and there will be no official support for this freeware program but you can send questions and report bugs to sysop@sintraweb.pt.

Upgrades (if any) will be available at http://clientes.sintraweb.pt/wclogdel

(C)2000 Sintraweb, Lda - Portugal
http://www.sintraweb.pt


