This program is freeware.

DISCLAIMER OF WARRANTY
THIS SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" AND WITHOUT
WARRANTIES AS TO PERFORMANCE OR ANY OTHER WARRANTIES WHETHER
EXPRESSED OR IMPLIED. BECAUSE OF THE VARIOUS HARDWARE AND SOFTWARE
ENVIRONMENTS INTO WHICH THIS PROGRAM MAY BE PUT, NO WARRANTY OF
FITNESS FOR PARTICULAR PURPOSE IS OFFERED. GOOD DATA PROCESSING
PROCEDURE DICTATES THAT ANY PROGRAM BE THOROUGHLY TESTED WITH
NON-CRITICAL DATA BEFORE RELYING ON IT. THE USER MUST ASSUME THE
ENTIRE RISK OF USING THE PROGRAM.

In other words, this program can do a lot of damage if improperly
used. Make sure you know how it works and how you should use it 
before running it.

How to be a truly fascist LAN administrator
===========================================

I wrote this program to automate the deletion of pirate and 
illegal software that users on our servers persisted in loading 
into their home directories. As a law enforcement agency, and to 
minimise the risk of viruses, we don't allow any executable files 
to be stored in user directories (all software is run from shared 
directories on the servers), and I got tired of spending time 
hunting for them with XTreeNet.

Features
--------
1. Searches the path you specify and all its subdirectories, 
looking in the first two bytes of each file to see if it is a 
program (all programs except .COM and some .SYS TSRs have the 
characters "MZ" in the first two bytes). It doesn't matter how 
users rename a program, it gets found and deleted. Note that by 
this definition, programs includes .EXE, .DLL. .DRV, .FOT, .BIN, 
.386, .FON, .VBX, etc. And indeed, they are all programs. A font 
is a program that renders characters on an output device. A VBX 
file is a DLL by another name. And so on.

2. Can create a log file showing all programs that were found.

3. Can be run in a reporting only mode, where programs are 
identified but not deleted.

4. If run in deleting mode, halts with a large _prominent_ 
message to which you must answer "Y" before deletion will 
continue.

5. Finds and deletes files regardless of what file attributes are 
set. (Obviously, you need to be Supervisor equivalent to run this 
program against all user directories).

6. Sets the purge bit on a file before deleting it, to prevent 
the user from salvaging the file.

7. Does not disturb the last accessed date on files that it 
reads. It saves the date last accessed before reading a file, and 
after reading the file restores its access date to the previous 
value. If a user is accessing a file while you are running 
NWDELEXE, you will see the following message:

NWSetDirEntryInfo failed 0x898E on <filename> 
Unable to reset last accessed date

This is nothing to worry about. If the user is accessing the file 
you don't have to worry about resetting its last accessed date.

As NWDELEXE is running you will see a series of dots on the 
screen. You get one dot for each directory scanned.

Parameters
----------
This is the help screen you get by entering NWDELEXE /?. The 
first parameter is the path from which to start scanning for 
files. The second parameter is the (optional) log file. The third 
parameter is where you can specify reporting mode or access date 
changing mode.

usage:       NWDELEXE path [log file] [/option]
   or:       NWDELEXE /?   (for this help screen)
path:        [server\]volume:dir
  or:        d:\dir
log file:    [server\]volume:dir\file
  or:        d:\dir\file
option:      A - reset date last accessed to date last updated
  or:        R - reporting only; doesn't delete any files
             The A or R options can only be specifed if a log
             file is also specified

The "A" option only exists because the first version of this 
program didn't reset the access date after reading a file, and 
when we ran out of space on a couple of servers, I couldn't use 
the access date to decide which user files to archive, as I had 
been accessing them all. I pulled a swiftie and reset the access 
date for files to the date last updated. This is the only time I 
have used this option.

If, having read this far, you think you might have a use for this 
program, but feel uneasy about running it (and I bet all of you 
are), then set yourself up a userid with only RF rights outside 
their home directory, and log on as that user to test NWDELEXE. 
That way you can't do any damage outside that user's directory. 
I've been running this program in its various versions against a 
dozen file servers for several months now without any untoward 
deletion of files that shouldn't have been deleted.

I usually set this program up in a batch file and run it in the 
evenings. On a fast workstation, it takes about 20 minutes to 
scan a single file server USER directory tree containing about 
2000 directories and 17000 files.

Am I really a fascist? Well, I definitely get satisfaction from
this program. You figure it out.

Nick Payne
11 Aug 93

