home *** CD-ROM | disk | FTP | other *** search
-
-
- C L E A N - F I L E S
- ═════════════════════
-
- (c) Copyright 1990,91 by Klaus Hartnegg,
- D-7835 Teningen, Germany
-
-
-
- Description:
- ────────────
- Every time DOS writes a file it fills up the last used cluster with some
- randomly collected data. CleanFile wipes out this unused data space
- without affecting the file itself. This ensures that you don't
- inadvertently publish confidential data when giving away some program-
- or data files on diskettes.
-
-
-
- New Features?
- ─────────────
- If you already have an older version of this program you should at least
- read the section 'revision history' near the end of this text.
-
-
-
- Requirements
- ────────────
- CleanFile only uses MS-DOS calls to do its work and BIOS for screen
- output. It does not use the FAT or any internal data structure of DOS
- and should thus run on all types of drives and all versions of DOS from
- 3.0 on upwards.
-
-
-
- Licence
- ───────
- This software is provided as-is, without warranty of any kind. The
- author shall not be liable to the user for any direct, indirect or
- consequential loss arising from the use of, or inability to use, any
- program or file howsoever caused. No warranty is given that the software
- will work under all circumstances.
-
- This software may be distributed free of charge as long as all files
- except the key-file are distributed together. The key-file is proof of
- your registration and must not be given to other persons.
-
- You may use this program for a 7 day trial period without payment. If
- you decide to use it longer than this trial period, you have to pay a
- registration fee of $15 (US-$).
-
- The registered version may be used either by one person or on one single
- computer only.
-
-
-
- Background
- ──────────
- Space on all disks (hard disk or floppy) is split into sectors.
- Depending on the size of the disk a sector contains 256, 512 or 1024
- characters. DOS can not write single characters but only complete
- sectors. Space on disks used for your files is allocated in even bigger
- units: clusters. A Cluster contains either 2, 4 or 8 sectors.
-
- Very little files happen to need an exact multiple of the cluster size.
- When writing a file, DOS fills up the rest of the last sector with some
- randomly chosen data that happened to be in one of its internal buffers.
- The unused sectors of the last cluster simply retain their previous
- content. DOS's internal buffers contain data or disk directories that
- you worked on just before.
-
- Imagine what that means: every time you gave a diskette away you
- included some private or maybe even confidential data, that you perhaps
- didn't really want to publish, even when using a freshly formatted
- diskette!
-
- You say `nobody can look at this data'? Oh yes, they can! It's in fact
- very easy: there are a lot of programs called `sector editors' that
- allow doing exactly this. Perhaps the most popular examples for such
- programs are Norton's wonderful utilities NU or DISKEDIT. Of course they
- were not written to serve this dubious purpose; instead they are
- intended to repair defective disks and do indeed a very good job of
- this.
-
-
-
- What CleanFile does
- ───────────────────
- CleanFile overwrites every character that exist beyond the end of your
- files with nulls. CleanFile will not only overwrite the rest of the last
- sector but also all unneeded sectors in the last cluster. This will not
- affect the content of your file.
-
- Please note that CleanFile does not prevent DOS from doing the error
- described above. It can only correct the problem after it already
- occurred. Thus it won't help to run CleanFile on the files on your hard
- disk that you intend to copy to a disk because the problem arises when
- you actually are copying the files. So you'll have to clean all
- destination files after every COPY or XCOPY! I am sorry, but that's the
- way DOS works!
-
- You may want to use CleanFile not only on diskettes but also on hard
- disks when several people share a computer. In this case you will need
- an additional program to wipe out the completely unused data space too.
-
-
-
-
- Usage
- ─────
- Supply the names of the files and/or directories that shall be cleaned
- as parameters on the command-line.
-
- You may press Ctrl-Break at any time to abort the processing. CleanFile
- will respond with a short beep but will not stop immediately - it has to
- close all open files first.
-
-
- Syntax : CleanFil [/Options] [filename(s)]
-
-
- filename(s):
-
- one ore more names of files and/or directories. Filenames may contain
- wildcard characters '?' and '*'. These wildcards will be handled in
- the usual way, NOT like extended wildcards in filenames that you
- supply after the exclude switch (see below)!
-
- Alternatively CleanFile can read the names of the files and/or
- directories to work on from the standard-input device. To use this
- you should know what redirection of input and output and pipes are.
- Please read your DOS manual for a description of these.
-
-
- Options: (Options can be supplied in any order)
-
- /R - recurse into subdirectories (registered versions only!)
-
- This will cause CleanFil to work not only on the files in the current
- or specified directory but also in all subdirectories and in all
- directories within these subdirectories and so on.
-
-
- /hid - include hidden files
-
- Cleanfile will process files with the hidden attribute set only when
- you specify this option. Read the section 'possible problems' below
- before using this option!
-
-
- /sys - include system files
-
- Cleanfile will process files with the system attribute set only when
- you specify this option. Read the section 'possible problems' below
- before using this option!
-
-
- /today - process only files that have been changed today.
-
-
- /D<date> - process only files that have been changed at or after the
- specified date.
-
- Run CleanFile without any arguments to find out in which format the
- date has to be written. The format depends on the country for which
- your computer has been installed. If the date format is not what you
- expected then a line is missing or invalid in the file CONFIG.SYS.
- For example in Germany one has to write 'country = 49,437'. No such
- redefinition may be necessary in the USA.
-
-
- /X<filename> - Exclude all files that match the given filename.
-
- You can supply many filenames separated by blanks if you put the
- whole string into ' or ". Example: cleanfil *.* '/x*.bak /x*.dat'
- This is however not necessary, because you can as well supply the /x
- switch multiple times. There is only one restriction and this is one
- of DOS not of CleanFile: The whole thing has to fit on the command
- line!
-
- Please note that the wildcard-handling for the exclude switch is a
- very special one: The names of all found files will be expanded to
- full path names including the drive letter and a colon before checking
- against the supplied filenames to be excluded. The filenames you
- supply may contain wildcard characters: a '?' matches one character
- or nothing, a '*' matches any string. Important: you can include many
- '?' and '*' characters!
-
- By the way, I said '*' matches ANY STRING. Is '\COMPILER\TP60' a
- string? YES! So 'c:*\*.pas' will of course match the filename
- 'c:\compiler\tp60\cleanfil.pas'!!
-
- There are two cases handled a bit special to ensure that cleanfile
- always does what you expect. Otherwise these masks would not match
- any file at all:
- 1. a mask containing a filename only, no path (i.e. no '\' character)
- will automatically be preceded by '*\'.
- 2. a mask starting with '\' will automatically be preceded by '?:'
-
- Some other examples:
-
- this pattern will match
- *\test.* all files with name 'test'
- *\test*.* all files with name starting with 'test'
- *\*test*.* all files with the string 'test' somewhere in the name!
- test.* (will be translated to *\test.*, see 1st example!)
- *\temp\*.* all files in all 'temp' directories
- *ler\t*.exe will for example match 'c:\compiler\tp60\turbo.exe'
-
-
-
- /S - simulate only
-
- This will allow you to become familiar with the way the exclude switch
- is handled without really doing anything. This was included because
- it could cause problems to clean certain files and you should have a
- chance to test whether the excludes you supplied really cause the
- expected files to be excluded. See the section 'possible problems'
- below for more information about such files.
-
- The program will produce almost the same output, listing all
- processed files, but will say 'ignoring' instead of 'cleaning' and
- will in fact not do anything except opening and closing the files. It
- will NOT really clean the data behind them.
-
-
-
- Examples:
-
- "CLEANFILE A:"
- cleans all files in the actual directory on drive A:
-
- "CLEANFILE A:\"
- cleans all files in the root directory of drive A:
-
- "CLEANFILE /r D:\"
- cleans all files on drive D:
-
- "CLEANFILE /r D:\DATA\*.DAT"
- cleans all files ending with "DAT" in directory "D:\DATA" and in all
- directories below
-
- "CLEANFILE C: /r /x*\GAMES\*.*"
- will clean all files on drive C: except the files contained in or
- below a directory with the name "GAMES".
-
- "CLEANFILE <CLEAN.DAT"
- this will read the files to be processed from the file "CLEAN.DAT".
- This file should contain one filename per line.
- The filenames may contain wildcards.
-
-
-
- Possible problems
- ─────────────────
-
- - Interrupt
-
- If CleanFile gets interrupted by an external event other than
- Ctrl-Break (for example by a disk error) some files may loose their
- protection flags and will show the wrong (the actual) date and time.
- This is because CleanFile has to remove all protection flags to be
- able to act on write protected files. In addition DOS updates the file
- date and time when CleanFile cleans them. Of course these two effects
- are usually undone by CleanFile before exiting; but when it becomes
- interrupted...
-
-
- - Output redirection
-
- When redirecting the screen output of CleanFile to a file please
- ensure that this file will not be cleaned in the same run! I'm working
- on detecting to which file the output is being redirected but
- CleanFile is not yet able to do that. Accessing that file twice could
- cause internal problems in DOS.
-
-
- - Some copy-protected software
-
- There exists some brain damaged commercial software that thinks it has
- been illegally copied when the content of the last used sector behind
- the actual end of the file has changed. Possibly they even manipulate
- the directory entry to show less bytes than actually occupied. You
- shouldn't run CleanFile on such software. Please don't blame me when
- you detect such a problem, blame the company that uses this for copy
- protection without placing a warning in the documentation!
-
- CleanFile now by default skips files with the hidden or system
- attribute set because programs that use such a questionable copy
- protection scheme mostly have one or both of these attributes set. I
- said 'mostly' so please be careful! Sorry, I can't give you any more
- hints on how to identify such software except by looking at these
- flags.
-
- You may now want to use the exclude switch to process a whole disk
- except some files or directories that could contain such brain damaged
- software. In this case please run cleanfile once with the simulate
- option to make sure that you use the right exclude syntax (the
- enhanced wild card handling is powerful but a bit tricky!). The
- simulate option allows you to see what files will be processed without
- the risk of doing any harm.
-
-
-
-
- A note for unix-users
- ─────────────────────
-
- This program will accept both
- a) '/' and '-' as switch character
- b) '\' and '/' as path separator
-
- This can of course cause trouble when you try to start a filename with
- '/'. This case will be handled in the following way:
-
- Usually everything starting with either '-' or '/' will be interpreted
- as an option so you can't start filenames with a '/'.
-
- When you have set the switch-character to '-' then only this character
- can be used to signal an option and '/' can be used even as the first
- character of a filename!
-
- You can even set the switch character to something completely different,
- say '~'. Then you can use both '-' and your switch character ('~')! I
- wish every program was so flexible!
-
-
-
-
- Key-File
- ────────
- Registered users will receive a key-file. This file is proof of your
- registration. It contains a serial number, your name and a verification
- number. This file, when present, will switch off the registration
- reminder and enable some more features.
-
- Without key-file a registration reminder will be shown for 5 seconds
- approximately every 3-rd time the program is run. Read the section
- "usage" above for more information about the features that are available
- for registered users only.
-
- The key-file will be found when it is either in the current directory,
- in the same directory as the EXE-file (recommended) or in any other
- directory that is contained in your PATH-variable.
-
- The key-file will work with all future versions of this program so you
- have to register only once.
-
-
-
- Included Files
- ──────────────
- CLEANFIL.EXE executable
- CLEANFIL.DOC documentation
- REGISTER.DOC registration form
-
- CLEANFIL.KEY key-file (registered version only)
-
-
-
- Revision History
- ────────────────
- 1.0 (sometime in June 1990)
-
- 1.1 (July 1990)
- - added wildcards
- - first official release
-
- 1.2 (August 1990)
- - bug caused trouble with hidden, read-only and system-files: sometimes
- they grew bigger, sometimes cleanfil aborted.
-
- 1.3 (09-10-1990)
- - some cosmetic changes (using bios for screen writes now).
- - registered version gained even some more speed when working on files
- within a subdirectory
- - registration made easier (key-file)
-
- 1.3a (09-22-1990)
- - several spelling errors corrected in this documentation
- - bug caused CleanFile to abort when the key-file was read-only
- - CleanFil can now be interrupted with Break or Ctrl-C; it will halt
- execution as soon as it is safe to do so.
- - '/' can be used as path separators as well as '\'
-
- 1.3b (10-11-1990)
- - some more spelling errors
- - two bugs when piping filenames into CleanFil: Ctrl-C and the special
- file handling didn't work
- - program partly rewritten; using OOP now for special file handling and
- formatted screen output
- - fast file handling now available for unregistered users too
- - inserted 5 second pause at the start for unregistered users
-
- 2.0 (10-16-1990)
- - added recursing into subdirectories
- - added a section for unix users to this documentation
- - output can now be redirected to a file
- - improved ctrl-break handler; ctrl-c doesn't work any more, you must
- use ctrl-break. A short beep will signal that the ctrl-break has been
- detected; program execution will stop as soon as possible.
- - raised registration fee from $10 to $15, old key-files continue working
-
- 2.1 (01-13-1991)
- - renamed recursing switch /s to /r
- - skipping hidden and system files now by default, also skipping all
- files within directories with one of these attributes set
- - added /hid and /sys, use them with care!
- - added /today and /D<date>
-
- 2.2 (02-08-1991)
- - improved screen output handler allows to cross directory boundaries
- in one clean-step thus speeding up a little bit
- - added exclude switch using extended wild card handling to exclude
- some files from processing
- - added simulate switch
-
- 2.3 (02-16-1991)
- - the previous version didn't work on XT's
-
-
- Future plans:
- - allow extended wildcards like the ones in excludes in includes too
- - skipping file where redirected output is being written to
-
-
- Many thanks to Michael D. Lawler for beta-testing this program. Large parts
- of the above revision history are really a list of suggestions he made.
-
-
-
-
- Registration
- ────────────
- Please register when you decide to use this program longer than the trial
- period. I can't continue distributing software in this low cost way if you
- do not register!
-
- Print the file REGISTER.DOC, fill out the registration form and send it
- to my address below. The registration fee is $15. You can save $5 when
- you want your key-file only and can receive uuencoded files via Internet.
- Please read the file REGISTER.DOC for details.
-
- Until now I can accept check or money orders only.
-
- Your name and address will be used for creation of the key-file unless
- you include a different name (company name or what else).
-
- You will receive the actual versions of all my shareware programs (E2A,
- CrLf, StripLf, CleanFil, Config) and your personal key-file for the program
- you payed for usually within a few days.
-
-
- ────────────────────────────
-
- Klaus Hartnegg
- Kleist-str. 7
- D-7835 Teningen
- Germany
-
-
- This software is under development. Error reports and other comments are
- welcome. Please do not hesitate to use electronic mail for communication.
-
- Bitnet - HAKL@DFRRUF1
- Internet - hakl@ibm.ruf.uni-freiburg.de