DELTEMPS V1.6 -- Copyright (C) 1995-1999  John Yeager


DESCRIPTION:
---------------------------------------------------------------------------------------------------------
DelTemps v1.6 is a program that runs from the command line prompt and 
scans all the logical disk drives you specify on the command line looking
for files that end in extension .TMP. If found, these files are targeted for
deletion regardless of attribute flag.

DelTemps will optionally also scan the directories specified by the TMP
and TEMP environment variables to delete *.*, ALL files in these directories.

*************************************************************
** This program has been verified for use with Windows 95. **
*************************************************************

PROGRAM ACTION:
---------------------------------------------------------------------------------------------------------
If a .TMP file is found, the program will attempt to delete the file. If
the file is initially found to be *not* deletable, the file attributes are
then set to NORMAL and then the program attempts to delete the file again.
If at the end of this loop the program still finds the file undeletable,
the program will notify you of this fact.

The above action continues until all directories on all drives have been
searched.

With the -ENVDEL switch enabled, DelTemps will optionally search the
directories specified in the TEMP and TMP environment variables. DelTemps
will delete ALL files in these directories, that is, *.* files. This option
is most useful under Windows 95 since some temporary files that Win 95
programs create don't have .TMP extensions, however, they are created in
these directories.

If TMP and TEMP point to the same directory name, DelTemps detects this and 
thus will only search the one common directory.


********************************WARNING************************************
The -ENVDEL option does *not* descriminate about which files it deletes in
these TMP and TEMP directories. Therefore, it is *YOUR RESPONSIBILITY* to
check that these directories do not contain any files that you wouldn't 
want to delete!!!

You can check what directories these TMP and TEMP variables are set to by
examining your AUTOEXEC.BAT file in your C:\ directory. Look for the
following statements:

SET TMP=C:\WINDOWS\TEMP
SET TEMP=C:\WINDOWS\TEMP

(Where C:\WINDOWS\TEMP is the directory YOUR system is pointing to.)

Then, go and check out these directories and make sure that there is
nothing in there that you would ever want to delete.

If you are not sure, you can change the SET statement to point to some
directories that you KNOW will not contain anything you want to save.

Use the following procedure to change the TMP and TEMP directories to
something safe:

1) Using a text editor, edit the C:\AUTOEXEC.BAT file.
2) Find the SET TMP= and the SET TEMP= entries.
3) Set the SET TMP= to SET TMP=C:\TEMP  
4) Set the SET TEMP= to SET TEMP=C:\TEMP
5) Save the AUTOEXEC.BAT file back to the hard disk and exit the text editor.
6) From DOS issue the following command: MD C:\TEMP
   (You may also create the directory from Explorer using the FILE|NEW|FOLDER
    menu or File Manager's FILE|CREATE DIRECTORY menu. Just ensure that
    you are creating the directory in the root directory of C:\)
7) REBOOT your computer for the changes to take effect, DO NOT just restart
   Windows.
8) You can verify that the changes are in place by issuing a SET command
   from MS-DOS. You should see the new SET TMP and SET TEMP statements
   set to your new directories.
***************************END**OF**WARNING*********************************

Use the -dp switch to optionally print out directory names to the screen
as they are scanned.

Use the -onceaday switch to limit DELTEMPS to one run in a 24 hour period.
(This is useful if your system boot times are long and would like to limit
 DELTEMPS to this check once a day.)

At the end of a successful DELTEMPS run, *if* files were deleted, DELTEMPS will
notify you of the amount of slack space bytes, actual file size bytes and then
the total amount of bytes that were returned to the disk in usuable space after
the temp files were deleted. 

PROGRAM USE:
---------------------------------------------------------------------------------------------------------
Use DelTemps from the DOS command line as in:
        
DELTEMPS [-dp] [-onceaday] [-envdel] [drive:] [drive:] [drive:] etc..

-DP        Use this *optional* switch if you want DELTEMPS to
           print the directories it is searching to the screen.

-ONCEADAY  Use this *optional* switch to limit the DELTEMPS to
           one run in 24 hour period. DELTEMPS will let you know
           how long till the next run.

-ENVDEL    Use this *optional* switch to delete ALL files(*.*), not
           just(.TMP) files in the directories pointed to by the
           environment variables TMP and TEMP.

           *BE CAREFUL WITH THE -ENVDEL SWITCH...READ THE WARNING*
           *IN THE PROGRAM ACTION SECTION OF THIS TEXT FILE*               

DRIVE:     You may specify from 1 to 26 drive letters on the
           command line.



USAGE EXAMPLES:

DELTEMPS -dp -envdel C: D: E: G: F:

(The above will search drives C: D: E: G: F: for .TMP files to delete.
 DelTemps will also search the directories specified in the TMP and TEMP
 environment variables looking for *.* ALL files to be deleted because of
 the -envdel switch.
 The -dp switch will display each directory name to the screen as it is
 searched.)

DELTEMPS C:

(The above will just search drive C: for .TMP files to delete.)

DELTEMPS -envdel

(DelTemps will just search the directories specified in the TMP and TEMP
 environment variables looking for *.* ALL files to be deleted because of
 the -envdel switch.)

DELTEMPS -onceaday C: D:

(The above command will limit DELTEMPS to run once in 24 hour period.
 DELTEMPS will let you know in hours, minutes and seconds how long it
 will be to the next run. DELTEMPS will always calculate it's next 24
 hour period time to run from the time of it's last successful run.)


For maximum effectiveness, DELTEMPS should also be inserted into your
autoexec.bat file so that it can be run at every computer boot.
To use in your autoexec.bat file,  I would suggest that DELTEMPS
be placed *after* any hard disk file integrity check utilties that
you use such as, ScanDisk,  NDD, SmartCan, etc... This will first
ensure disk FAT or VFAT integrity before DELTEMPS does it work. 

- You may specify as few as 1 or as many as 26 disk drives in one
  operation for DELTEMPS to scan.
- DELTEMPS will work on any valid Read/Write device with a DOS recognized drive
  letter,  i.e., C: G:, etc, using the standard DOS FAT filing system OR
  the newer VFAT filing system under Win95. DELTEMPS *will* scan a READ-ONLY
  type of device such as a CD-ROM, however, it obviously won't be able to
  delete any temp files if found. 
- To get a synopsis of how to use this program plus registration info just type
  DELTEMPS without any command line arguments or DELTEMPS /? or DELTEMPS ?

**********************************************************************************
***  DELTEMPS will *not* run if Windows is running since Windows depends on    ***
***some temporary files being opened while it is running for correct operation.***
**********************************************************************************


PROGRAM HISTORY
-------------------------------------------------------------------------------------------------------
Ver 1.0      3/20/95 - Initial Release
Ver 1.1      3/27/95 - Check and Set file attributes to _A_NORMAL
                       for a delete if needed.
                     - Added Windows running detection.
                     - Added Search total run time in seconds.
Ver 1.2      11/2/95 - Add capability to check other drives by specfying drive
                       letters on command line.
                     - Added better parsing of cmd line and error checking.
                     - Tweaked code for performance improvements.
                     - Added code for Evaluation version of the program.
Ver 1.3      1/10/96 - Fixed bug for not scanning directories with attributes
                       of _A_RDONLY|_A_HIDDEN|_A_SYSTEM.
                     - Added command line option to print directory names to
                       screen if desired with the -dp switch.
                     - Added command line option to delete the contents of the
                       directories pointed to by the TMP or TEMP environment
                       variables with the -envdel switch.
                     - Added drive validation existence checking for the
                       command line.
                     - Ver 1.3 NEVER OFFICALLY RELEASED... DO NOT USE THIS VERSION  
Ver 1.4      1/22/96 - Fixed problem with -envdel switch and TMP, TEMP environment
                       variables.
Ver 1.5      3/21/96 - Added switch to allow only one run per 24 hr period based on
                       date and -onceaday switch.
                     - Added slack space bytes and file deleted bytes report returned
                       at end of run.
                     - Added "time to next run" if -onceaday switch used.
                     - Added drive validation checking on command line.
Ver 1.6      6/24/99 - Changed my address and version number ** Only Pentium Version
                       Now Released **        
              
REGISTRATION INFO
---------------------------------------------------------------------------------------------------------
THANK YOU FOR REGISTERING!!!

Please read these few points:

- Please do not distribute the REGISTERED version of this software to anyone else...

- If you increase the number of PC's that DelTemps runs on please remit the
  additional registration fees.

- Software registration qualifys you for a copy of the fully unrestricted
  functioning version. Optimized flavors for the 386, 486 and Pentium CPUs
  are included. Also, you receive, free future program updates and
  tech support.

- Again, my U.S. mail address is:
        John Yeager
        15 Hunter Drive
        Glenmoore, PA 19343
   
- Contact me on the Internet with any questions, comments, etc at:
        jyeager@chesco.com OR
       

OTHER INFO:
---------------------------------------------------------------------------------------------------------
This program was coded using Watcom's C/C++ V10.5 compiler in C using the
small code libraries and optimized for Pentium processors. The code has been
tested to run on 386+ systems though. 

                                   DISCLAIMER

     John Yeager hereby disclaims all warranties relating to this
     product, whether express or implied, including without limitation
     any implied warranties of merchantability or fitness for a
     particular purpose.  John Yeager cannot and will not be liable
     for any special, incidental, consequential, indirect, or similar
     damages due to loss of data or any other reason, even if John
     Yeager or an authorized John Yeager agent has been advised of
     the possibility of such damages.  The user of this program bears all
     risk as to the quality and performance of the software.  Use of this
     program acknowledges this disclaimer of warranty.


Thanks to Fred Paxia for beta testing!!!


