home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / UTILITY / DISK / CLNFIL23.ZIP / CLEANFIL.DOC next >
Encoding:
Text File  |  1991-02-16  |  17.0 KB  |  468 lines

  1.  
  2.  
  3.                        C L E A N - F I L E S
  4.                        ═════════════════════
  5.  
  6.                (c) Copyright 1990,91 by Klaus Hartnegg,
  7.                       D-7835 Teningen, Germany
  8.  
  9.  
  10.  
  11. Description:
  12. ────────────
  13. Every time DOS writes a file it fills up the last used cluster with some
  14. randomly collected data. CleanFile wipes out this unused data space
  15. without affecting the file itself. This ensures that you don't
  16. inadvertently publish confidential data when giving away some program- 
  17. or data files on diskettes.
  18.  
  19.  
  20.  
  21. New Features?
  22. ─────────────
  23. If you already have an older version of this program you should at least
  24. read the section 'revision history' near the end of this text.
  25.  
  26.  
  27.  
  28. Requirements
  29. ────────────
  30. CleanFile only uses MS-DOS calls to do its work and BIOS for screen
  31. output. It does not use the FAT or any internal data structure of DOS
  32. and should thus run on all types of drives and all versions of DOS from
  33. 3.0 on upwards.
  34.  
  35.  
  36.  
  37. Licence
  38. ───────
  39. This software is provided as-is, without warranty of any kind. The 
  40. author shall not be liable to the user for any direct, indirect or 
  41. consequential loss arising from the use of, or inability to use, any 
  42. program or file howsoever caused. No warranty is given that the software 
  43. will work under all circumstances.
  44.  
  45. This software may be distributed free of charge as long as all files
  46. except the key-file are distributed together. The key-file is proof of
  47. your registration and must not be given to other persons.
  48.  
  49. You may use this program for a 7 day trial period without payment. If
  50. you decide to use it longer than this trial period, you have to pay a
  51. registration fee of $15 (US-$).
  52.  
  53. The registered version may be used either by one person or on one single
  54. computer only.
  55.  
  56.  
  57.  
  58. Background
  59. ──────────
  60. Space on all disks (hard disk or floppy) is split into sectors.
  61. Depending on the size of the disk a sector contains 256, 512 or 1024
  62. characters.  DOS can not write single characters but only complete
  63. sectors. Space on disks used for your files is allocated in even bigger
  64. units: clusters.  A Cluster contains either 2, 4 or 8 sectors.
  65.  
  66. Very little files happen to need an exact multiple of the cluster size.
  67. When writing a file, DOS fills up the rest of the last sector with some
  68. randomly chosen data that happened to be in one of its internal buffers.
  69. The unused sectors of the last cluster simply retain their previous
  70. content. DOS's internal buffers contain data or disk directories that
  71. you worked on just before.
  72.  
  73. Imagine what that means: every time you gave a diskette away you
  74. included some private or maybe even confidential data, that you perhaps 
  75. didn't really want to publish, even when using a freshly formatted 
  76. diskette!
  77.  
  78. You say `nobody can look at this data'? Oh yes, they can! It's in fact
  79. very easy: there are a lot of programs called `sector editors' that
  80. allow doing exactly this. Perhaps the most popular examples for such
  81. programs are Norton's wonderful utilities NU or DISKEDIT. Of course they
  82. were not written to serve this dubious purpose; instead they are 
  83. intended to repair defective disks and do indeed a very good job of 
  84. this.
  85.  
  86.  
  87.  
  88. What CleanFile does
  89. ───────────────────
  90. CleanFile overwrites every character that exist beyond the end of your
  91. files with nulls. CleanFile will not only overwrite the rest of the last
  92. sector but also all unneeded sectors in the last cluster. This will not
  93. affect the content of your file.
  94.  
  95. Please note that CleanFile does not prevent DOS from doing the error
  96. described above. It can only correct the problem after it already
  97. occurred.  Thus it won't help to run CleanFile on the files on your hard
  98. disk that you intend to copy to a disk because the problem arises when
  99. you actually are copying the files. So you'll have to clean all
  100. destination files after every COPY or XCOPY! I am sorry, but that's the
  101. way DOS works!
  102.  
  103. You may want to use CleanFile not only on diskettes but also on hard
  104. disks when several people share a computer. In this case you will need
  105. an additional program to wipe out the completely unused data space too.
  106.  
  107.  
  108.  
  109.  
  110. Usage
  111. ─────
  112. Supply the names of the files and/or directories that shall be cleaned
  113. as parameters on the command-line.
  114.  
  115. You may press Ctrl-Break at any time to abort the processing. CleanFile
  116. will respond with a short beep but will not stop immediately - it has to
  117. close all open files first.
  118.  
  119.  
  120. Syntax : CleanFil [/Options] [filename(s)]
  121.  
  122.  
  123. filename(s):
  124.  
  125.    one ore more names of files and/or directories. Filenames may contain
  126.    wildcard characters '?' and '*'. These wildcards will be handled in
  127.    the usual way, NOT like extended wildcards in filenames that you
  128.    supply after the exclude switch (see below)!
  129.  
  130.    Alternatively CleanFile can read the names of the files and/or
  131.    directories to work on from the standard-input device. To use this
  132.    you should know what redirection of input and output and pipes are.
  133.    Please read your DOS manual for a description of these.
  134.  
  135.  
  136. Options:  (Options can be supplied in any order)
  137.  
  138. /R - recurse into subdirectories (registered versions only!)
  139.  
  140.    This will cause CleanFil to work not only on the files in the current
  141.    or specified directory but also in all subdirectories and in all
  142.    directories within these subdirectories and so on.
  143.  
  144.  
  145. /hid - include hidden files
  146.  
  147.    Cleanfile will process files with the hidden attribute set only when
  148.    you specify this option. Read the section 'possible problems' below
  149.    before using this option!
  150.  
  151.  
  152. /sys - include system files
  153.  
  154.    Cleanfile will process files with the system attribute set only when
  155.    you specify this option. Read the section 'possible problems' below
  156.    before using this option!
  157.  
  158.  
  159. /today - process only files that have been changed today.
  160.  
  161.  
  162. /D<date> - process only files that have been changed at or after the
  163.            specified date.
  164.  
  165.    Run CleanFile without any arguments to find out in which format the 
  166.    date has to be written. The format depends on the country for which 
  167.    your computer has been installed. If the date format is not what you 
  168.    expected then a line is missing or invalid in the file CONFIG.SYS.  
  169.    For example in Germany one has to write 'country = 49,437'. No such 
  170.    redefinition may be necessary in the USA.
  171.  
  172.  
  173. /X<filename> - Exclude all files that match the given filename.
  174.  
  175.    You can supply many filenames separated by blanks if you put the
  176.    whole string into ' or ". Example: cleanfil *.* '/x*.bak /x*.dat'
  177.    This is however not necessary, because you can as well supply the /x
  178.    switch multiple times. There is only one restriction and this is one
  179.    of DOS not of CleanFile: The whole thing has to fit on the command 
  180.    line!
  181.  
  182.    Please note that the wildcard-handling for the exclude switch is a
  183.    very special one: The names of all found files will be expanded to
  184.    full path names including the drive letter and a colon before checking
  185.    against the supplied filenames to be excluded. The filenames you 
  186.    supply may contain wildcard characters: a '?' matches one character 
  187.    or nothing, a '*' matches any string. Important: you can include many 
  188.    '?' and '*' characters!
  189.  
  190.    By the way, I said '*' matches ANY STRING. Is '\COMPILER\TP60' a
  191.    string?  YES! So 'c:*\*.pas' will of course match the filename
  192.    'c:\compiler\tp60\cleanfil.pas'!!
  193.  
  194.    There are two cases handled a bit special to ensure that cleanfile
  195.    always does what you expect. Otherwise these masks would not match
  196.    any file at all:
  197.    1. a mask containing a filename only, no path (i.e. no '\' character)
  198.       will automatically be preceded by '*\'.
  199.    2. a mask starting with '\' will automatically be preceded by '?:'
  200.  
  201.    Some other examples:
  202.  
  203.    this pattern  will match
  204.    *\test.*      all files with name 'test'
  205.    *\test*.*     all files with name starting with 'test'
  206.    *\*test*.*    all files with the string 'test' somewhere in the name!
  207.    test.*        (will be translated to *\test.*, see 1st example!)
  208.    *\temp\*.*    all files in all 'temp' directories
  209.    *ler\t*.exe   will for example match 'c:\compiler\tp60\turbo.exe'
  210.  
  211.  
  212.  
  213. /S - simulate only
  214.  
  215.    This will allow you to become familiar with the way the exclude switch
  216.    is handled without really doing anything. This was included because 
  217.    it could cause problems to clean certain files and you should have a
  218.    chance to test whether the excludes you supplied really cause the
  219.    expected files to be excluded. See the section 'possible problems' 
  220.    below for more information about such files.
  221.  
  222.    The program will produce almost the same output, listing all
  223.    processed files, but will say 'ignoring' instead of 'cleaning' and
  224.    will in fact not do anything except opening and closing the files. It
  225.    will NOT really clean the data behind them.
  226.  
  227.  
  228.  
  229. Examples:
  230.  
  231. "CLEANFILE A:"
  232.    cleans all files in the actual directory on drive A:
  233.  
  234. "CLEANFILE A:\"
  235.    cleans all files in the root directory of drive A:
  236.  
  237. "CLEANFILE /r D:\"
  238.    cleans all files on drive D:
  239.  
  240. "CLEANFILE /r D:\DATA\*.DAT"
  241.    cleans all files ending with "DAT" in directory "D:\DATA" and in all
  242.    directories below
  243.  
  244. "CLEANFILE C: /r /x*\GAMES\*.*"
  245.    will clean all files on drive C: except the files contained in or
  246.    below a directory with the name "GAMES".
  247.  
  248. "CLEANFILE <CLEAN.DAT"
  249.    this will read the files to be processed from the file "CLEAN.DAT".
  250.    This file should contain one filename per line.
  251.    The filenames may contain wildcards.
  252.  
  253.  
  254.  
  255. Possible problems
  256. ─────────────────
  257.  
  258. - Interrupt
  259.  
  260.   If CleanFile gets interrupted by an external event other than
  261.   Ctrl-Break (for example by a disk error) some files may loose their
  262.   protection flags and will show the wrong (the actual) date and time.
  263.   This is because CleanFile has to remove all protection flags to be
  264.   able to act on write protected files. In addition DOS updates the file 
  265.   date and time when CleanFile cleans them. Of course these two effects 
  266.   are usually undone by CleanFile before exiting; but when it becomes 
  267.   interrupted...
  268.  
  269.  
  270. - Output redirection
  271.  
  272.   When redirecting the screen output of CleanFile to a file please
  273.   ensure that this file will not be cleaned in the same run! I'm working
  274.   on detecting to which file the output is being redirected but
  275.   CleanFile is not yet able to do that. Accessing that file twice could
  276.   cause internal problems in DOS.
  277.  
  278.  
  279. - Some copy-protected software
  280.  
  281.   There exists some brain damaged commercial software that thinks it has
  282.   been illegally copied when the content of the last used sector behind
  283.   the actual end of the file has changed. Possibly they even manipulate
  284.   the directory entry to show less bytes than actually occupied. You
  285.   shouldn't run CleanFile on such software. Please don't blame me when
  286.   you detect such a problem, blame the company that uses this for copy
  287.   protection without placing a warning in the documentation!
  288.  
  289.   CleanFile now by default skips files with the hidden or system 
  290.   attribute set because programs that use such a questionable copy 
  291.   protection scheme mostly have one or both of these attributes set. I 
  292.   said 'mostly' so please be careful! Sorry, I can't give you any more
  293.   hints on how to identify such software except by looking at these 
  294.   flags.
  295.  
  296.   You may now want to use the exclude switch to process a whole disk
  297.   except some files or directories that could contain such brain damaged
  298.   software. In this case please run cleanfile once with the simulate 
  299.   option to make sure that you use the right exclude syntax (the 
  300.   enhanced wild card handling is powerful but a bit tricky!). The 
  301.   simulate option allows you to see what files will be processed without 
  302.   the risk of doing any harm.
  303.  
  304.  
  305.  
  306.  
  307. A note for unix-users
  308. ─────────────────────
  309.  
  310. This program will accept both
  311. a) '/' and '-' as switch character
  312. b) '\' and '/' as path separator
  313.  
  314. This can of course cause trouble when you try to start a filename with 
  315. '/'. This case will be handled in the following way:
  316.  
  317.   Usually everything starting with either '-' or '/' will be interpreted
  318.   as an option so you can't start filenames with a '/'.
  319.  
  320.   When you have set the switch-character to '-' then only this character
  321.   can be used to signal an option and '/' can be used even as the first
  322.   character of a filename!
  323.  
  324. You can even set the switch character to something completely different, 
  325. say '~'. Then you can use both '-' and your switch character ('~')! I 
  326. wish every program was so flexible!
  327.  
  328.  
  329.  
  330.  
  331. Key-File
  332. ────────
  333. Registered users will receive a key-file. This file is proof of your 
  334. registration. It contains a serial number, your name and a verification 
  335. number. This file, when present, will switch off the registration 
  336. reminder and enable some more features.
  337.  
  338. Without key-file a registration reminder will be shown for 5 seconds
  339. approximately every 3-rd time the program is run. Read the section
  340. "usage" above for more information about the features that are available
  341. for registered users only.
  342.  
  343. The key-file will be found when it is either in the current directory, 
  344. in the same directory as the EXE-file (recommended) or in any other 
  345. directory that is contained in your PATH-variable.
  346.  
  347. The key-file will work with all future versions of this program so you
  348. have to register only once.
  349.  
  350.  
  351.  
  352. Included Files
  353. ──────────────
  354. CLEANFIL.EXE   executable
  355. CLEANFIL.DOC   documentation
  356. REGISTER.DOC   registration form
  357.  
  358. CLEANFIL.KEY   key-file (registered version only)
  359.  
  360.  
  361.  
  362. Revision History
  363. ────────────────
  364. 1.0  (sometime in June 1990)
  365.  
  366. 1.1 (July 1990)
  367. - added wildcards
  368. - first official release
  369.  
  370. 1.2 (August 1990)
  371. - bug caused trouble with hidden, read-only and system-files: sometimes
  372.   they grew bigger, sometimes cleanfil aborted.
  373.  
  374. 1.3 (09-10-1990)
  375. - some cosmetic changes (using bios for screen writes now).
  376. - registered version gained even some more speed when working on files
  377.   within a subdirectory
  378. - registration made easier (key-file)
  379.  
  380. 1.3a (09-22-1990)
  381. - several spelling errors corrected in this documentation
  382. - bug caused CleanFile to abort when the key-file was read-only
  383. - CleanFil can now be interrupted with Break or Ctrl-C; it will halt
  384.   execution as soon as it is safe to do so.
  385. - '/' can be used as path separators as well as '\'
  386.  
  387. 1.3b (10-11-1990)
  388. - some more spelling errors
  389. - two bugs when piping filenames into CleanFil: Ctrl-C and the special
  390.   file handling didn't work
  391. - program partly rewritten; using OOP now for special file handling and
  392.   formatted screen output
  393. - fast file handling now available for unregistered users too
  394. - inserted 5 second pause at the start for unregistered users
  395.  
  396. 2.0 (10-16-1990)
  397. - added recursing into subdirectories
  398. - added a section for unix users to this documentation
  399. - output can now be redirected to a file
  400. - improved ctrl-break handler; ctrl-c doesn't work any more, you must
  401.   use ctrl-break. A short beep will signal that the ctrl-break has been
  402.   detected; program execution will stop as soon as possible.
  403. - raised registration fee from $10 to $15, old key-files continue working
  404.  
  405. 2.1 (01-13-1991)
  406. - renamed recursing switch /s to /r
  407. - skipping hidden and system files now by default, also skipping all
  408.   files within directories with one of these attributes set
  409. - added /hid and /sys, use them with care!
  410. - added /today and /D<date>
  411.  
  412. 2.2 (02-08-1991)
  413. - improved screen output handler allows to cross directory boundaries
  414.   in one clean-step thus speeding up a little bit
  415. - added exclude switch using extended wild card handling to exclude
  416.   some files from processing
  417. - added simulate switch
  418.  
  419. 2.3 (02-16-1991)
  420. - the previous version didn't work on XT's
  421.  
  422.  
  423. Future plans:
  424. - allow extended wildcards like the ones in excludes in includes too
  425. - skipping file where redirected output is being written to
  426.  
  427.  
  428. Many thanks to Michael D. Lawler for beta-testing this program. Large parts
  429. of the above revision history are really a list of suggestions he made.
  430.  
  431.  
  432.  
  433.  
  434. Registration
  435. ────────────
  436. Please register when you decide to use this program longer than the trial
  437. period. I can't continue distributing software in this low cost way if you
  438. do not register!
  439.  
  440. Print the file REGISTER.DOC, fill out the registration form and send it
  441. to my address below. The registration fee is $15. You can save $5 when
  442. you want your key-file only and can receive uuencoded files via Internet.
  443. Please read the file REGISTER.DOC for details.
  444.  
  445. Until now I can accept check or money orders only.
  446.  
  447. Your name and address will be used for creation of the key-file unless
  448. you include a different name (company name or what else).
  449.  
  450. You will receive the actual versions of all my shareware programs (E2A,
  451. CrLf, StripLf, CleanFil, Config) and your personal key-file for the program
  452. you payed for usually within a few days. 
  453.  
  454.  
  455. ────────────────────────────
  456.  
  457.    Klaus Hartnegg
  458.    Kleist-str. 7
  459.    D-7835 Teningen
  460.    Germany
  461.  
  462.  
  463. This software is under development. Error reports and other comments are
  464. welcome. Please do not hesitate to use electronic mail for communication.
  465.  
  466. Bitnet   - HAKL@DFRRUF1
  467. Internet - hakl@ibm.ruf.uni-freiburg.de
  468.