home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS 1992 June / SIMTEL_0692.cdr / msdos / dirutl / findup39.arc / FINDUPE.DOC < prev   
Encoding:
Text File  |  1988-10-30  |  25.7 KB  |  407 lines

  1. Program FindDupe is placed in the Public Domain system by the
  2. author.  It is however copyrighted and all rights and ownership
  3. are kept with the author.  You may use it, copy it, give it to
  4. your friends but don't try to sell it.  Because the devil will
  5. get you and if I find out I will prosecute.
  6.  
  7. The program is a Turbo Pascal Program that reads the directories
  8. of your disks - it really only works best with hard disks because
  9. you don't usually have sub directories on floppies.
  10.  
  11. The program will print on paper (using Epson controls - only form
  12. feed) or the screen.
  13.  
  14. It will give you a list of all files, sorted by file name, date,
  15. time, size and directory they are in.  It will also tell you if
  16. the file is read only, hidden, system or sub directory.
  17.  
  18. It will give you a list of all duplicate named files on your disk,
  19. with the same above information.
  20.  
  21. It will give you a Sorted Tree Dir of the files on your disk with
  22. the above information.
  23.  
  24. Best of luck in your computing and may this program help you in
  25. keeping your machine manageable.
  26.  
  27. If you are using this program and you find it of use in your
  28. system then please contribute to support this means of providing
  29. great software into the hands of people who need and use software
  30. in their daily activities.
  31.  
  32. I am requesting $10.00 or what ever you thing is reasonable for a
  33. program of this caliber -no more than $100,000.00-.
  34.  
  35. For businesses this fee is not optional.  I will be willing to
  36. discuss Site Licensing.
  37.  
  38. Copyright (C) 1984, 1985, 1986, 1987 Karson W. Morrison
  39.                                      Caleb Computer Consultants
  40.                                      RD 3,
  41.                                      417 Larsen Rd.
  42.                                      Ringoes NJ. 08551
  43.                                      (201)-788-1846
  44.  
  45.  
  46.  
  47.  
  48. Version 2.1 modifications
  49.  
  50.                Version 2.1   October 27, 1985
  51.                  Modifications by Ray Bobak
  52.                     Sysop PC-RAIN Node II
  53.                     Wappingers Falls, NY
  54.                     914-462-7674 (data)
  55.  
  56.  Updated code so that the input string from the command line was a
  57.  list of drives to perform the services on.  This change was made
  58.  to allow SYSOP's with multiple download drives to scan all his
  59.  download drives for duplicates.  (Here you go Charlie, your name
  60.  in lights.)  This version was inspired by Charlie Innusa, a sysop
  61.  running RBBS-PC on only nine 32 Megabyte download drives.  You can
  62.  call his BBS, PC-Rockland at 914-353-2157 Subscription node, or
  63.                               914-353-2176 free node
  64.  
  65.  
  66. FINDUP21 can now search across multiple drives.  Just string the drive
  67. letters after the program name.
  68.  
  69. The command 'FINDUP21 ABCDEFGHIJKLMNOP' will cause FINDUP21 to search across
  70. drives A, B, C, D, E, F, G, ... O, and P.  Running this progam on your LAN
  71. may be detrimental to your networks performance!  Note: sorting may take a
  72. large amount of temporary disk space.  For 10K files, an 800K datafile is
  73. used for intermediate storage of the sort.  Make sure you have the space!
  74.  
  75. Hope this helps all those SYSOP's out in keeping thier BBS's free of duplicate
  76. files on their multi-drive file systems.
  77.  
  78. Ray Bobak (aka The Wiz)
  79. Wappingers Falls, NY
  80. October 27, 1985
  81.  
  82. Sysop - PC-RAIN Node II
  83. Wappingers Falls, NY
  84. (914)-462-7674 (data only)
  85.  
  86.     ╔══════════════════════════════════════════════════════════════════════╗
  87.     ║  This program was written by and Copyright (C) 1984, 1985, 1986 by   ║
  88.     ║                                                                      ║
  89.     ║                              Karson W. Morrison                      ║
  90.     ║                              RD. 3,                                  ║
  91.     ║                              417 Larsen Rd.                          ║
  92.     ║                              Ringoes, NJ. 08551                      ║
  93.     ║                              (201) 788-1846                          ║
  94.     ╠══════════════════════════════════════════════════════════════════════╣
  95.     ║  Acknowledgements:                                                   ║
  96.     ║                                                                      ║
  97.     ║  I used info picked up from a  bulletin  board  for  the  routines   ║
  98.     ║  to get system date and time.  That info. was created by  Jon Gray   ║
  99.     ║  of the IBM PC USERS GROUP Milwaukee.  It did have  a  bug  though   ║
  100.     ║  that would only work with months of 2 digits (now fixed by me).     ║
  101.     ║                                                                      ║
  102.     ║  I  also  used  routines  provided  by  Borland for the reading of   ║
  103.     ║  directories. This info was provided in their Turbo Tutor package.   ║
  104.     ║                                                                      ║
  105.     ║  Purpose:                                                            ║
  106.     ║                                                                      ║
  107.     ║  Every time I turned  around I  was  trying  to delete some of the   ║
  108.     ║  files on my hard disk because I was  always  ending  up with only   ║
  109.     ║  300 - 400 K left.  I kept  thinking  there  must be an easier way   ║
  110.     ║  to know if there were duplicate files.                              ║
  111.     ║                                                                      ║
  112.     ║                     This is the result                               ║
  113.     ╠══════════════════════════════════════════════════════════════════════╣
  114.     ║                Version 2.0   March 25, 1985                          ║
  115.     ║                    Made by the author.                               ║
  116.     ║                                                                      ║
  117.     ║  Updated program to put file size on  each line and put in a major   ║
  118.     ║  option for Sorted Tree Directories.                                 ║
  119.     ║                                                                      ║
  120.     ║  Every Tree Dir program that I have seen always  intersperces  sub   ║
  121.     ║  directories files where it finds them  with  the regular files in   ║
  122.     ║  that directory.  This program  put  files  together,  followed by   ║
  123.     ║  the sub directory files in  that directory.  The sub  directories   ║
  124.     ║  are sorted, and  then  printed  in  the  sorted  order within the   ║
  125.     ║  the parent directory.                                               ║
  126.     ║                                                                      ║
  127.     ║  Updated program to put output on a file DIRECTRY.DTA as an option   ║
  128.     ║  for later printing or other modification.                           ║
  129.     ╠══════════════════════════════════════════════════════════════════════╣
  130.     ║                Version 2.01   April 23, 1985                         ║
  131.     ║                    Made by the author.                               ║
  132.     ║                                                                      ║
  133.     ║  Made a change to increase the valid characters  that may be  in a   ║
  134.     ║  file name.  The 7Fh, DEL  char  may  be  in  a file name there by   ║
  135.     ║  making the file name unable to be entered from the keyboard.        ║
  136.     ║                                                                      ║
  137.     ║  This also is used to make a directory hidden.                       ║
  138.     ║  Fix the line which prints on the screen when a report is being      ║
  139.     ║  produced on paper.                                                  ║
  140.     ╠══════════════════════════════════════════════════════════════════════╣
  141.     ║              Version 2.02  July 28, 1985                             ║
  142.     ║                   Made by the author.                                ║
  143.     ║                                                                      ║
  144.     ║  Made a change to put a Clrscr in at the beginning of the program.   ║
  145.     ║  This was necessary if you use the Public Domain program to reset    ║
  146.     ║  the clear screen at the begining of the program.                    ║
  147.     ║  Turbo 3.0 also doesn't clear screen at beginning of program.        ║
  148.     ╠══════════════════════════════════════════════════════════════════════╣
  149.     ║             Version 2.03 September 9, 1985                           ║
  150.     ║                    Made by the author.                               ║
  151.     ║                                                                      ║
  152.     ║  Made a change to calculate to space used for 1K blocks which is     ║
  153.     ║  what is used when the data is stored on a floppy.                   ║
  154.     ╠══════════════════════════════════════════════════════════════════════╣
  155.     ║             Version 2.04 November 11, 1985                           ║
  156.     ║                     Made by author                                   ║
  157.     ║                                                                      ║
  158.     ║  Made a change to the first screen so that it would be easier to     ║
  159.     ║  understand the options.  Included Windows by Lynn Canning,          ║
  160.     ║  with the original code by Lane Farris.                              ║
  161.     ╠══════════════════════════════════════════════════════════════════════╣
  162.     ║             Version 3.00 December 12, 1985                           ║
  163.     ║                     Made by author                                   ║
  164.     ║  This version now requires Turbo 3.0                                 ║
  165.     ║                                                                      ║
  166.     ║  This version now will read multiple hard disks and floppies and     ║
  167.     ║  do its thing on the file names.                                     ║
  168.     ║                                                                      ║
  169.     ║       Option 1, 2, 4 will allow you to go to the screen, printer     ║
  170.     ║                      or disk file.                                   ║
  171.     ║       Option 3 will only go to disk file 'DIRECTRY.DTA' for the      ║
  172.     ║                directory and 'DUPLICAT.DTA' for the duplicate        ║
  173.     ║                entries.                                              ║
  174.     ║                                                                      ║
  175.     ║       Option 4 Sorted Tree Directory uses the Drive letter as its    ║
  176.     ║                major sort key.  Therefore it will not mix up file    ║
  177.     ║                and directories names from multiple drives.           ║
  178.     ║                                                                      ║
  179.     ║  This version of the program also supports floppies.  The program    ║
  180.     ║  would read them before but the output was not too useful because    ║
  181.     ║  only one floppy could be read at a time.  *** NOW *** the program   ║
  182.     ║  asks you if you are reading a hard drive or a floppy.  Nothing      ║
  183.     ║  happens to the machine if you answer the wrong answer, it is to     ║
  184.     ║  allow me to know if I should VolumeID the disk (I don't on Hard     ║
  185.     ║  Disks).  If you want me to Volume-ID a floppy just enter the data.  ║
  186.     ║  (What you enter will also show on the report as the main directory  ║
  187.     ║  If you don't enter a Volume-ID (return) I show the name 'FLOPPYnnn' ║
  188.     ║  as the main directory. (nnn is the number of the diskette entered)  ║
  189.     ║                                                                      ║
  190.     ║  If you want to speed up the entry process, and you have two or more ║
  191.     ║  floppy drives run the program as FINDDUPE AB.  The program will     ║
  192.     ║  alternate between the drives.  (NOTE:) one problem in using this    ║
  193.     ║  feature you must have a floppy for both A and B drives. (You could  ║
  194.     ║  place a blank formatted floppy in the last B: drive to insure       ║
  195.     ║  the completion of the input phase.)                                 ║
  196.     ║                                                                      ║
  197.     ║                                                                      ║
  198.     ║  Included into version 3.00 are changes made by Ray Bobak as he      ║
  199.     ║  noted above.                                                        ║
  200.     ║                                                                      ║
  201.     ╠══════════════════════════════════════════════════════════════════════╣
  202.     ║  Version 3.01 made by the author was a minor change to fix the time  ║
  203.     ║  when the hour was a one digit hour 1..9 am.  This program was never ║
  204.     ║  released into the public.  The arc file issued by the author was    ║
  205.     ║  also missing the windo.inc file.                                    ║
  206.     ╠══════════════════════════════════════════════════════════════════════╣
  207.     ║  Version 3.02 made by the author was made to properly handle the     ║
  208.     ║  floppy drive and the output when processing floppies on a floppy    ║
  209.     ║  system.  Unfortunatily I tested it on a hard disk system.  I created║
  210.     ║  the output file on a floppy (the first one that you wanted to read) ║
  211.     ║  and when I got around to writing the output, you now had a different║
  212.     ║  floppy in the drive -- the program abended.  I also cleaned up the  ║
  213.     ║  input of the command line.  If you enter FINDDUPE A:B:  I will      ║
  214.     ║  delete the colon before processing the data.                        ║
  215.     ║                                                                      ║
  216.     ║  I also changed the program to allow a volume-id to be read with     ║
  217.     ║  imbedded blanks in it.  Version 3.0 stopped the Volume-id at the    ║
  218.     ║  first blank.  I now start at position 11 and back up to the first   ║
  219.     ║  non-blank character and say that the volume-id is that many chars.  ║
  220.     ║  long.                                                               ║
  221.     ║                                                                      ║
  222.     ║  Keep the cards and letters flowing with changes, revisions needed   ║
  223.     ║  etc.  The next planned change is to prompt for deletion in the      ║
  224.     ║  duplicate file phase.  I know where the duplicates are I just need  ║
  225.     ║  you to tell me which one to delete (if you want to that is).        ║
  226.     ╠══════════════════════════════════════════════════════════════════════╣
  227.     ║  Version 3.03 made by the author to make a change to the way that    ║
  228.     ║  Turbo passes back a volume-id.  Turbo passes the data back like     ║
  229.     ║  a file name, meaning if the volume-id has imbedded spaces in the    ║
  230.     ║  position ending in 8 then turbo removes the space and puts the      ║
  231.     ║  period after the seventh character or if you have a vol-id like     ║
  232.     ║  TURBO   001 then the vol-id passed back is TURBO.001 which is not   ║
  233.     ║  what you wanted.  I also made changes to insure that before I       ║
  234.     ║  begin processing that I'm working on the correct drive.  Because    ║
  235.     ║  the program allows you to enter a command line I always used it and ║
  236.     ║  if nothing was entered then I defaulted to the current drive.  That ║
  237.     ║  may not have been what you wanted, therefore I ask the question     ║
  238.     ║  amy I working on the drive you want? and if not I ask for the       ║
  239.     ║  correct drive letters.                                              ║
  240.     ╠══════════════════════════════════════════════════════════════════════╣
  241.     ║  Version 3.05 made by author.  Some versions of MS-DOS (AT&T, TANDY  ║
  242.     ║  and maybe others) do something strange with Turbo Pascal when you   ║
  243.     ║  read a volume-id.  PC-DOS will give you the Volume-Id, but the      ║
  244.     ║  MS-DOS's above pass back the first file as the Volume-Id.  I have   ║
  245.     ║  put in coding to keep looking for a volume-id if what I get back    ║
  246.     ║  is not what I was expecting.                                        ║
  247.     ╠══════════════════════════════════════════════════════════════════════╣
  248.     ║  Version 3.06 made by the author.  I included the option to enter a  ║
  249.     ║  file name for known duplicates.  You may have a condition where a   ║
  250.     ║  file name is duplicated in different sub-directories, but the file  ║
  251.     ║  is not a duplicate.                                                 ║
  252.     ║                                                                      ║
  253.     ║  Create a file that is made up of the known duplicated file names ie.║
  254.     ║  READ.ME                                                             ║
  255.     ║  AUTOEXEC.BAT                                                        ║
  256.     ║  CONFIG.SYS                                                          ║
  257.     ║  etc.                                                                ║
  258.     ║  It is not necessary to have the file names capalized but each file  ║
  259.     ║  should be on a seperate line.  I sample of the file is included in  ║
  260.     ║  the Arc file of this program.                                       ║
  261.     ║                                                                      ║
  262.     ╚══════════════════════════════════════════════════════════════════════╝
  263.     ╔══════════════════════════════════════════════════════════════════════╗
  264.     ║  Yours for better Computing                                          ║
  265.     ║                         Karson W. Morrison Caleb Computer Consultants║
  266.     ╚══════════════════════════════════════════════════════════════════════╝
  267.  
  268.     ╔══════════════════════════════════════════════════════════════════════╗
  269.     ║                                                                      ║
  270.     ║  NOTE:                                                               ║
  271.     ║                                                                      ║
  272.     ║  A command line is used as input if entered else the default drive   ║
  273.     ║  is used.                                                            ║
  274.     ╚══════════════════════════════════════════════════════════════════════╝
  275.     ╔══════════════════════════════════════════════════════════════════════╗
  276.     ║                                                                      ║
  277.     ║  NOTE:                                                               ║
  278.     ║                                                                      ║
  279.     ║  Before you forget Please sent in your $10.00 registration fee and   ║
  280.     ║  I will make sure that you have the most resent version of the       ║
  281.     ║  of the program.  If this program does not work on your computer     ║
  282.     ║  because of your configuration (i.e. Does not support windows)       ║
  283.     ║  please let me know also and I can provide a version for that.       ║
  284.     ║                                                                      ║
  285.     ║  Businesses the fee is not optional.                                 ║
  286.     ║                                                                      ║
  287.     ╚══════════════════════════════════════════════════════════════════════╝
  288.  
  289. Note:  I have been asked how many records will this program sort.
  290.  
  291. Borland will not give any assistance in trying to find out, by giving formulas
  292. etc.  So this is the best that I can figure out.
  293.  
  294. The program reserves about 63k for itself and the windows, and it will take
  295. the rest of the available memory for sort work space.  When it runs out of
  296. memory then it writes the sort work data to disk.  What ever is your default
  297. drive.
  298.  
  299. On my machine I ran a CHKDSK and I had 219xxx free.
  300.  
  301. Finddupe would have been able to sort 2159 records, each one of them 73
  302. positions long.  This would have been a work space of 157461 in memory.
  303. If I tried to sort more records than that then it would have written some
  304. of them to disk.  The work area in memory is divided into pages, each of
  305. them less than 64K.  You will have at least 3 work areas (PAGES) in memory
  306. and when it writes to disk it will write a page.  In my example I had 3 pages
  307. each of them 157461 / 3 long or 52483 bytes.  You will have more than 3 pages
  308. when you have more than 64K * 3 <192K> of free memory.  The max is 10 pages
  309. 64K * 10 = 640K.
  310.  
  311. When the program writes to disk, it will write a page from memory, and then
  312. continue sorting.  If it runs out of disk space then the program abends.
  313. However if you have 360K of free space on your drive then it should handle
  314. over 6000 records.  (Again this is my assumption, because the sort work space
  315. does not stay around after the job is over).
  316.     ╔══════════════════════════════════════════════════════════════════════╗
  317.     ║  Version 3.06 made by the author.  I included the option to enter a  ║
  318.     ║  file name for known duplicates.  You may have a condition where a   ║
  319.     ║  file name is duplicated in different sub-directories, but the file  ║
  320.     ║  is not a duplicate.                                                 ║
  321.     ║                                                                      ║
  322.     ║  Create a file that is made up of the known duplicated file names ie.║
  323.     ║  READ.ME                                                             ║
  324.     ║  AUTOEXEC.BAT                                                        ║
  325.     ║  CONFIG.SYS                                                          ║
  326.     ║  etc.                                                                ║
  327.     ║                                                                      ║
  328.     ║  It is not necessary to have the file names capalized but each file  ║
  329.     ║  should be on a seperate line.  I sample of the file is included in  ║
  330.     ║  the Arc file of this program.                                       ║
  331.     ║                                                                      ║
  332.     ║  The record format is 1-12 positions (like a file Name) XXXXXXXX.XXX ║
  333.     ║  If the file name is not a full 12 positions long then type it like  ║
  334.     ║  this CONFIG.SYS  Not like this CONFIG  .SYS.  Do not put spaces in  ║
  335.     ║  the middle of the name.                                             ║
  336.     ║                                                                      ║
  337.     ║                                                                      ║
  338.     ╚══════════════════════════════════════════════════════════════════════╝
  339.  
  340.        There was a program bug in version 3.06 that was caused by my
  341.        entering the above program change.  The program abended when you
  342.        processed Option 2 or 4.  It ran OK if you ran Option 1-3.  It now
  343.        works OK for Options 1-4.
  344.  
  345.     ╔══════════════════════════════════════════════════════════════════════╗
  346.     ║  Version 3.08 made by the author.  I included the option to enter a  ║
  347.     ║  code to tell the program that you are processing on a Monochrome    ║
  348.     ║  monitor.  The program will know if you have a monochrome controller ║
  349.     ║  however, if you have a color graphics controller it will assume that║
  350.     ║  you also have a color monitor.  This may not be the case.           ║
  351.     ║                                                                      ║
  352.     ║  On the command line type FINDDUPE M     (For Monochrome)            ║
  353.     ║                                                                      ║
  354.     ║  If you are also entering the drive letters on the command line the  ║
  355.     ║  example might be like this: FINDDUPE CD M  (For read drives C: and  ║
  356.     ║                                              D: on a Monochrome      ║
  357.     ║                                              Monitor.)               ║
  358.     ║  If you only have a drive M: the program will assume that you mean   ║
  359.     ║  monochrome.  If you have multiple drives and M: just happens to be  ║
  360.     ║  one of them, then you will be OK. Type FINDDUPE GHIJKLMN (or what   ║
  361.     ║  ever your drives letters are.)                                      ║
  362.     ║                                                                      ║
  363.     ║                                                                      ║
  364.     ╚══════════════════════════════════════════════════════════════════════╝
  365.     ╔══════════════════════════════════════════════════════════════════════╗
  366.     ║  Version 3.09 made by the author because of the U.S. Post Office.    ║
  367.     ║                                                                      ║
  368.     ║  The U.S. Post office changed my address so I am reissuing this      ║
  369.     ║  program to change my address.                                       ║
  370.     ║                                                                      ║
  371.     ╚══════════════════════════════════════════════════════════════════════╝
  372.  
  373.          ----------------end-of-author's-documentation---------------
  374.  
  375.                         Software Library Information:
  376.  
  377.                    This disk copy provided as a service of
  378.  
  379.                         The Public (Software) Library
  380.  
  381.          We are not the authors of this program, nor are we associated
  382.          with the author in any way other than as a distributor of the
  383.          program in accordance with the author's terms of distribution.
  384.  
  385.          Please direct shareware payments and specific questions about
  386.          this program to the author of the program, whose name appears
  387.          elsewhere in  this documentation. If you have trouble getting
  388.          in touch with the author,  we will do whatever we can to help
  389.          you with your questions. All programs have been tested and do
  390.          run.  To report problems,  please use the form that is in the
  391.          file PROBLEM.DOC on many of our disks or in other written for-
  392.          mat with screen printouts, if possible.  The P(s)L cannot de-
  393.          bug programs over the telephone.
  394.  
  395.          Disks in the P(s)L are updated monthly, so if you did not get
  396.          this disk  directly from the P(s)L,  you should be aware that
  397.          the files in this set may no  longer be the current versions.
  398.  
  399.          For a copy of the latest monthly software library newsletter
  400.          and a list of the 1,600+ disks in the library, call or write
  401.  
  402.                         The Public (Software) Library
  403.                               P.O.Box 35705 - F
  404.                            Houston, TX 77235-5705
  405.                                (713) 665-7017
  406.  
  407.