Metropoli BBS
VIEWER: crsdupe3.bat MODE: TEXT (ASCII)
:: RUNNING TIME (dedicated environment on 486DX2/50 VLB):  4 hours 15 minutes
:: (time is 3 hours 5 minutes if the optional "master" list is not created)

:: This batch file is NOT complete.  It shows another way to compare DIRs and
:: create a duplicate trash file that facilitates returning a description to a
:: DIR if you decided you wanted to check for a description that was stripped
:: as a dupe but was really a different program.  Kept duplicate descriptions
:: are in the lower numbered (categorized) DIRs.  Of course, if you keep two or
:: more descriptions that have the same name but are different programs, you'll
:: need some kind of way a caller can specify which one to download or it will
:: be potluck (there is also another problem:  whenever you add a new CD-ROM,
:: the duplicated descriptions that you reinserting into the DIRs when the last
:: CD-ROM was added will be stripped again; see the TRICKS file for suggested
:: solutions).  This batch file may be the best of both worlds since MERGE now
:: has a switch, "/1M", which allows you to easily replace a kept description
:: in a DIR with a longer or more recent one that was removed from another DIR.

:: Run DIRDUPE.BAT on the individual DIRs before using this batch file.  These
:: commands are written for MERGESYS; for MERGEPRO, add to each line:  /s /f1
:: If the DIR headings are still in place, also add /b1?? /b2??h.


@echo off
if %1x==masterx goto MASTER
if %1x==MASTERx goto MASTER

::
:: COMPARE ALL FILES TO REMOVE "CROSS FILE DUPLICATES"
:: Start off the "compares" with DIR1 to DIR2 and work up.  There are two
:: reasons:  1. you'll end up with fewer compares since each DIR will already
:: have any cross duplicates removed by the time it is compared to the next DIR
:: and 2. if it was done backwards and a duplicate was removed from DIR61 that
:: was in DIR60 when DIR60 was compared to DIR61, then the same description was
:: was removed from DIR60 because it was in DIR59, etc. etc., it would be hard
:: to track down the DIR where the description was finally kept.  This way,
:: when DIR60 is compared to DIR61 and a cross duplicate description is removed
:: from DIR61, you know it will still be in DIR60.  Also, you are starting at
:: the lower DIRs because they are already categorized (although that could
:: mean a later dated cross duplicate description will be removed from a higher
:: numbered DIR, but then that's what the log and trash files are for, besides
:: making sure the same names are really duplicated programs).

:: There are many alternatives to the method shown here.  You could compare
:: DIR1 to DIR2, DIR1 to DIR3, DIR1 to DIR4, ..., DIR2 to DIR3, DIR2 to DIR4,
:: ..., DIR3 to DIR4, ... and get the same results.  The big difference is how
:: the "cross duplicate" trash files would end up.  If when you were doing the
:: "DIR1 to" compares, you named the trash file CROSSDUP.D1 each time, it would
:: contain all cross dupes removed from DIRs 2 through 61 that were in DIR1.
:: This organization facilitates examining CROSSDUP.D1 and using it to replace
:: any of DIR1's descriptions which have an earlier date or are shorter than a
:: description that was stripped from another DIR (the method in CRSDUPE2.BAT).

:: Or you could change the trash file name each time to correspond to the DIR
:: being compared (the one having the cross dupes removed) and it would then
:: have the cross dupes which were removed from that DIR and which were kept in
:: a lower numbered DIR (the same as will result using the commands below).
:: This facilitates examining CROSSDUP.D60 and deciding to return a stripped
:: description to DIR60 because it was really a different program and not just
:: a duplicated description.  After comparing all the DIRs, you can merge every
:: dupe trash file together (including the ones created by merging the DIRs on
:: themselves) with option /k to keep duplicates and get a "master" of EVERY
:: description that was duplicated along with the one that was kept, which can
:: be used in several different ways (a suggestion is at the end of this file).

:: NOTE:  PCBFiler chops off a description line at 78 characters.  If you use
:: it to sort a trash file that has "happy faces" to mark kept descriptions
:: and the first line of a kept description is 78 characters long, the "happy
:: face" will disappear because it ended up in column 79.  And you can't tell
:: by which description comes first because PCBFiler does not necessarily keep
:: the relative order of same named descriptions.  All descriptions will still
:: be sorted on name ascending, but same named descriptions may have had their
:: positions in relation to each other switched (same as the date problem).  If
:: you want to inspect trash file descriptions, do it before running PCBFiler.
:: CRSDUPE1.BAT shows how to avoid sorting "compare" cross dupe trash files.

:: 2
MERGE /o /1t /td:\temp\crossdup.d2+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir1 d:\pcb\dirc\dir2

:: 3
MERGE /o /1t /td:\temp\crossdup.d3+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir1 d:\pcb\dirc\dir3
MERGE /o /1t /td:\temp\crossdup.d3+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir2 d:\pcb\dirc\dir3

:: 4
MERGE /o /1t /td:\temp\crossdup.d4+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir1 d:\pcb\dirc\dir4
MERGE /o /1t /td:\temp\crossdup.d4+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir2 d:\pcb\dirc\dir4
MERGE /o /1t /td:\temp\crossdup.d4+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir3 d:\pcb\dirc\dir4

:: 5
MERGE /o /1t /td:\temp\crossdup.d5+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir1 d:\pcb\dirc\dir5
MERGE /o /1t /td:\temp\crossdup.d5+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir2 d:\pcb\dirc\dir5
MERGE /o /1t /td:\temp\crossdup.d5+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir3 d:\pcb\dirc\dir5
MERGE /o /1t /td:\temp\crossdup.d5+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir4 d:\pcb\dirc\dir5

:: 6
MERGE /o /1t /td:\temp\crossdup.d6+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir1 d:\pcb\dirc\dir6
MERGE /o /1t /td:\temp\crossdup.d6+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir2 d:\pcb\dirc\dir6
MERGE /o /1t /td:\temp\crossdup.d6+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir3 d:\pcb\dirc\dir6
MERGE /o /1t /td:\temp\crossdup.d6+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir4 d:\pcb\dirc\dir6
MERGE /o /1t /td:\temp\crossdup.d6+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir5 d:\pcb\dirc\dir6

:: 7
MERGE /o /1t /td:\temp\crossdup.d7+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir1 d:\pcb\dirc\dir7
MERGE /o /1t /td:\temp\crossdup.d7+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir2 d:\pcb\dirc\dir7
MERGE /o /1t /td:\temp\crossdup.d7+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir3 d:\pcb\dirc\dir7
MERGE /o /1t /td:\temp\crossdup.d7+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir4 d:\pcb\dirc\dir7
MERGE /o /1t /td:\temp\crossdup.d7+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir5 d:\pcb\dirc\dir7
MERGE /o /1t /td:\temp\crossdup.d7+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir6 d:\pcb\dirc\dir7

:: The compares for DIRs 8 thru 59 have been removed to save space, but the
:: same function can be done by COMBINE.BAT, which uses batch file tricks to
:: reduce the number of lines.

:: 60
MERGE /o /1t /td:\temp\crossdup.d60+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir1 d:\pcb\dirc\dir60
MERGE /o /1t /td:\temp\crossdup.d60+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir2 d:\pcb\dirc\dir60
MERGE /o /1t /td:\temp\crossdup.d60+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir3 d:\pcb\dirc\dir60
MERGE /o /1t /td:\temp\crossdup.d60+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir4 d:\pcb\dirc\dir60
MERGE /o /1t /td:\temp\crossdup.d60+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir5 d:\pcb\dirc\dir60
MERGE /o /1t /td:\temp\crossdup.d60+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir6 d:\pcb\dirc\dir60
MERGE /o /1t /td:\temp\crossdup.d60+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir7 d:\pcb\dirc\dir60
MERGE /o /1t /td:\temp\crossdup.d60+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir8 d:\pcb\dirc\dir60
MERGE /o /1t /td:\temp\crossdup.d60+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir9 d:\pcb\dirc\dir60
MERGE /o /1t /td:\temp\crossdup.d60+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir10 d:\pcb\dirc\dir60
MERGE /o /1t /td:\temp\crossdup.d60+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir11 d:\pcb\dirc\dir60
MERGE /o /1t /td:\temp\crossdup.d60+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir12 d:\pcb\dirc\dir60
MERGE /o /1t /td:\temp\crossdup.d60+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir13 d:\pcb\dirc\dir60
MERGE /o /1t /td:\temp\crossdup.d60+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir14 d:\pcb\dirc\dir60
MERGE /o /1t /td:\temp\crossdup.d60+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir15 d:\pcb\dirc\dir60
MERGE /o /1t /td:\temp\crossdup.d60+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir16 d:\pcb\dirc\dir60
MERGE /o /1t /td:\temp\crossdup.d60+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir17 d:\pcb\dirc\dir60
MERGE /o /1t /td:\temp\crossdup.d60+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir18 d:\pcb\dirc\dir60
MERGE /o /1t /td:\temp\crossdup.d60+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir19 d:\pcb\dirc\dir60
MERGE /o /1t /td:\temp\crossdup.d60+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir20 d:\pcb\dirc\dir60
MERGE /o /1t /td:\temp\crossdup.d60+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir21 d:\pcb\dirc\dir60
MERGE /o /1t /td:\temp\crossdup.d60+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir22 d:\pcb\dirc\dir60
MERGE /o /1t /td:\temp\crossdup.d60+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir23 d:\pcb\dirc\dir60
MERGE /o /1t /td:\temp\crossdup.d60+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir24 d:\pcb\dirc\dir60
MERGE /o /1t /td:\temp\crossdup.d60+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir25 d:\pcb\dirc\dir60
MERGE /o /1t /td:\temp\crossdup.d60+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir26 d:\pcb\dirc\dir60
MERGE /o /1t /td:\temp\crossdup.d60+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir27 d:\pcb\dirc\dir60
MERGE /o /1t /td:\temp\crossdup.d60+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir28 d:\pcb\dirc\dir60
MERGE /o /1t /td:\temp\crossdup.d60+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir29 d:\pcb\dirc\dir60
MERGE /o /1t /td:\temp\crossdup.d60+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir30 d:\pcb\dirc\dir60
MERGE /o /1t /td:\temp\crossdup.d60+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir31 d:\pcb\dirc\dir60
MERGE /o /1t /td:\temp\crossdup.d60+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir32 d:\pcb\dirc\dir60
MERGE /o /1t /td:\temp\crossdup.d60+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir33 d:\pcb\dirc\dir60
MERGE /o /1t /td:\temp\crossdup.d60+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir34 d:\pcb\dirc\dir60
MERGE /o /1t /td:\temp\crossdup.d60+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir35 d:\pcb\dirc\dir60
MERGE /o /1t /td:\temp\crossdup.d60+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir36 d:\pcb\dirc\dir60
MERGE /o /1t /td:\temp\crossdup.d60+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir37 d:\pcb\dirc\dir60
MERGE /o /1t /td:\temp\crossdup.d60+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir38 d:\pcb\dirc\dir60
MERGE /o /1t /td:\temp\crossdup.d60+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir39 d:\pcb\dirc\dir60
MERGE /o /1t /td:\temp\crossdup.d60+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir40 d:\pcb\dirc\dir60
MERGE /o /1t /td:\temp\crossdup.d60+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir41 d:\pcb\dirc\dir60
MERGE /o /1t /td:\temp\crossdup.d60+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir42 d:\pcb\dirc\dir60
MERGE /o /1t /td:\temp\crossdup.d60+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir43 d:\pcb\dirc\dir60
MERGE /o /1t /td:\temp\crossdup.d60+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir44 d:\pcb\dirc\dir60
MERGE /o /1t /td:\temp\crossdup.d60+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir45 d:\pcb\dirc\dir60
MERGE /o /1t /td:\temp\crossdup.d60+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir46 d:\pcb\dirc\dir60
MERGE /o /1t /td:\temp\crossdup.d60+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir47 d:\pcb\dirc\dir60
MERGE /o /1t /td:\temp\crossdup.d60+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir48 d:\pcb\dirc\dir60
MERGE /o /1t /td:\temp\crossdup.d60+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir49 d:\pcb\dirc\dir60
MERGE /o /1t /td:\temp\crossdup.d60+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir50 d:\pcb\dirc\dir60
MERGE /o /1t /td:\temp\crossdup.d60+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir51 d:\pcb\dirc\dir60
MERGE /o /1t /td:\temp\crossdup.d60+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir52 d:\pcb\dirc\dir60
MERGE /o /1t /td:\temp\crossdup.d60+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir53 d:\pcb\dirc\dir60
MERGE /o /1t /td:\temp\crossdup.d60+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir54 d:\pcb\dirc\dir60
MERGE /o /1t /td:\temp\crossdup.d60+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir55 d:\pcb\dirc\dir60
MERGE /o /1t /td:\temp\crossdup.d60+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir56 d:\pcb\dirc\dir60
MERGE /o /1t /td:\temp\crossdup.d60+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir57 d:\pcb\dirc\dir60
MERGE /o /1t /td:\temp\crossdup.d60+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir58 d:\pcb\dirc\dir60
MERGE /o /1t /td:\temp\crossdup.d60+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir59 d:\pcb\dirc\dir60

:: 61
MERGE /o /1t /td:\temp\crossdup.d61+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir1 d:\pcb\dirc\dir61
MERGE /o /1t /td:\temp\crossdup.d61+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir2 d:\pcb\dirc\dir61
MERGE /o /1t /td:\temp\crossdup.d61+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir3 d:\pcb\dirc\dir61
MERGE /o /1t /td:\temp\crossdup.d61+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir4 d:\pcb\dirc\dir61
MERGE /o /1t /td:\temp\crossdup.d61+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir5 d:\pcb\dirc\dir61
MERGE /o /1t /td:\temp\crossdup.d61+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir6 d:\pcb\dirc\dir61
MERGE /o /1t /td:\temp\crossdup.d61+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir7 d:\pcb\dirc\dir61
MERGE /o /1t /td:\temp\crossdup.d61+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir8 d:\pcb\dirc\dir61
MERGE /o /1t /td:\temp\crossdup.d61+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir9 d:\pcb\dirc\dir61
MERGE /o /1t /td:\temp\crossdup.d61+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir10 d:\pcb\dirc\dir61
MERGE /o /1t /td:\temp\crossdup.d61+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir11 d:\pcb\dirc\dir61
MERGE /o /1t /td:\temp\crossdup.d61+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir12 d:\pcb\dirc\dir61
MERGE /o /1t /td:\temp\crossdup.d61+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir13 d:\pcb\dirc\dir61
MERGE /o /1t /td:\temp\crossdup.d61+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir14 d:\pcb\dirc\dir61
MERGE /o /1t /td:\temp\crossdup.d61+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir15 d:\pcb\dirc\dir61
MERGE /o /1t /td:\temp\crossdup.d61+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir16 d:\pcb\dirc\dir61
MERGE /o /1t /td:\temp\crossdup.d61+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir17 d:\pcb\dirc\dir61
MERGE /o /1t /td:\temp\crossdup.d61+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir18 d:\pcb\dirc\dir61
MERGE /o /1t /td:\temp\crossdup.d61+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir19 d:\pcb\dirc\dir61
MERGE /o /1t /td:\temp\crossdup.d61+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir20 d:\pcb\dirc\dir61
MERGE /o /1t /td:\temp\crossdup.d61+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir21 d:\pcb\dirc\dir61
MERGE /o /1t /td:\temp\crossdup.d61+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir22 d:\pcb\dirc\dir61
MERGE /o /1t /td:\temp\crossdup.d61+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir23 d:\pcb\dirc\dir61
MERGE /o /1t /td:\temp\crossdup.d61+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir24 d:\pcb\dirc\dir61
MERGE /o /1t /td:\temp\crossdup.d61+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir25 d:\pcb\dirc\dir61
MERGE /o /1t /td:\temp\crossdup.d61+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir26 d:\pcb\dirc\dir61
MERGE /o /1t /td:\temp\crossdup.d61+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir27 d:\pcb\dirc\dir61
MERGE /o /1t /td:\temp\crossdup.d61+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir28 d:\pcb\dirc\dir61
MERGE /o /1t /td:\temp\crossdup.d61+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir29 d:\pcb\dirc\dir61
MERGE /o /1t /td:\temp\crossdup.d61+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir30 d:\pcb\dirc\dir61
MERGE /o /1t /td:\temp\crossdup.d61+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir31 d:\pcb\dirc\dir61
MERGE /o /1t /td:\temp\crossdup.d61+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir32 d:\pcb\dirc\dir61
MERGE /o /1t /td:\temp\crossdup.d61+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir33 d:\pcb\dirc\dir61
MERGE /o /1t /td:\temp\crossdup.d61+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir34 d:\pcb\dirc\dir61
MERGE /o /1t /td:\temp\crossdup.d61+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir35 d:\pcb\dirc\dir61
MERGE /o /1t /td:\temp\crossdup.d61+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir36 d:\pcb\dirc\dir61
MERGE /o /1t /td:\temp\crossdup.d61+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir37 d:\pcb\dirc\dir61
MERGE /o /1t /td:\temp\crossdup.d61+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir38 d:\pcb\dirc\dir61
MERGE /o /1t /td:\temp\crossdup.d61+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir39 d:\pcb\dirc\dir61
MERGE /o /1t /td:\temp\crossdup.d61+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir40 d:\pcb\dirc\dir61
MERGE /o /1t /td:\temp\crossdup.d61+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir41 d:\pcb\dirc\dir61
MERGE /o /1t /td:\temp\crossdup.d61+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir42 d:\pcb\dirc\dir61
MERGE /o /1t /td:\temp\crossdup.d61+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir43 d:\pcb\dirc\dir61
MERGE /o /1t /td:\temp\crossdup.d61+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir44 d:\pcb\dirc\dir61
MERGE /o /1t /td:\temp\crossdup.d61+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir45 d:\pcb\dirc\dir61
MERGE /o /1t /td:\temp\crossdup.d61+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir46 d:\pcb\dirc\dir61
MERGE /o /1t /td:\temp\crossdup.d61+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir47 d:\pcb\dirc\dir61
MERGE /o /1t /td:\temp\crossdup.d61+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir48 d:\pcb\dirc\dir61
MERGE /o /1t /td:\temp\crossdup.d61+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir49 d:\pcb\dirc\dir61
MERGE /o /1t /td:\temp\crossdup.d61+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir50 d:\pcb\dirc\dir61
MERGE /o /1t /td:\temp\crossdup.d61+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir51 d:\pcb\dirc\dir61
MERGE /o /1t /td:\temp\crossdup.d61+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir52 d:\pcb\dirc\dir61
MERGE /o /1t /td:\temp\crossdup.d61+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir53 d:\pcb\dirc\dir61
MERGE /o /1t /td:\temp\crossdup.d61+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir54 d:\pcb\dirc\dir61
MERGE /o /1t /td:\temp\crossdup.d61+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir55 d:\pcb\dirc\dir61
MERGE /o /1t /td:\temp\crossdup.d61+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir56 d:\pcb\dirc\dir61
MERGE /o /1t /td:\temp\crossdup.d61+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir57 d:\pcb\dirc\dir61
MERGE /o /1t /td:\temp\crossdup.d61+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir58 d:\pcb\dirc\dir61
MERGE /o /1t /td:\temp\crossdup.d61+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir59 d:\pcb\dirc\dir61

:: DIR60 to DIR61
:: Since you're using the CHK4DES/ADDTODAY system to "upload" files to your bbs
:: which often results in DIR61 descriptions being the best, if the same type
:: of "compare" was done here as with the other DIRs, you could lose a good
:: description in DIR61 because of a duplicate name from DIR60.  These steps
:: perform a little slight of hand, removing a duplicate description from DIR61
:: and replacing DIR60's description with it (since DIR60 is a "misc" category,
:: you needn't be concerned that if this isn't really a duplicate you'll get a
:: program in the wrong place).  The trash file will get both descriptions as
:: usual, and the "happy face" will indicate which is kept, but this time it is
:: from DIR61 (it's not the "first occurrence" that was in DIR60).  Instead of
:: the "happy face" description preceding the stripped one, it will come after
:: it in D61_60.DUP (the first occurrence from DIR60 is still first), which is
:: then appended to CROSSDUP.D61 (this has the duplicates stripped from DIR61).
:: There are several ways this could be done, but the method below demonstrates
:: another new switch, "/1M", which compares file 1 to file 2, but instead of
:: just removing duplicates from file 2, file 1 descriptions that match those
:: in file 2 are merged into file 2, REPLACING the original description in file
:: 2 (only a match is merged; the rest of the descriptions are not effected).
:: If the DIRs have headings, add /b1?? /b2??h to line 1 and /b2??h to line 3.

MERGE /o /1m /td:\temp\stripd60.dup+n /ld:\temp\crossdup.log /vl1 d:\pcb\dirc\dir61 d:\pcb\dirc\dir60
if not exist d:\temp\stripd60.dup goto PROMPT
MERGE /o /1 /td:\temp\kept_d61.dup+n /ld:\temp\crossdup.log d:\temp\stripd60.dup d:\pcb\dirc\dir61
MERGE /o /k /1t /td:\temp\d61_60.dup+n /ld:\temp\crossdup.log d:\temp\kept_d61.dup d:\temp\stripd60.dup
MERGE /o /k /ld:\temp\crossdup.log d:\temp\stripd60.dup d:\temp\d61_60.dup
copy d:\temp\crossdup.d61+d:\temp\d61_60.dup d:\temp\crossdup.d61 /b
echo.
del d:\temp\kept_d61.dup
del d:\temp\stripd60.dup
del d:\temp\d61_60.dup

:: If you always want to make a master file list, delete the 6 lines below and
:: change the "goto PROMPT" above to "goto MASTER" (without the quotes).

:PROMPT
echo 
echo Enter ^C to abort, any other key to generate the "master" list now.  You can
echo also restart this batch file later to only make the master list by entering:
echo CRSDUPE3 MASTER
pause

::
:: MAKE THE "MASTER" LIST (OPTIONAL)
:: Merge all the lists together to make a "master" file if desired.  You need a
:: lot of disk space for this, but you should have it (I ran out!  You'll need
:: at least 30 megs of free space before this part starts).  If you are doing
:: this step AFTER replacing names that are duplicates but not the same file,
:: add /k to the command line so duplicates aren't stripped from the master.
:: If the DIRs still have headings, add /b1?? to all the lines below and /b21
:: to every line except the first.

:MASTER
MERGE /o /ld:\temp\master.log d:\pcb\dirc\dir1 d:\pcb\dirc\dir2 d:\temp\master
MERGE /o /ld:\temp\master.log d:\pcb\dirc\dir3 d:\temp\master
MERGE /o /ld:\temp\master.log d:\pcb\dirc\dir4 d:\temp\master
MERGE /o /ld:\temp\master.log d:\pcb\dirc\dir5 d:\temp\master
MERGE /o /ld:\temp\master.log d:\pcb\dirc\dir6 d:\temp\master
MERGE /o /ld:\temp\master.log d:\pcb\dirc\dir7 d:\temp\master
MERGE /o /ld:\temp\master.log d:\pcb\dirc\dir8 d:\temp\master
MERGE /o /ld:\temp\master.log d:\pcb\dirc\dir9 d:\temp\master
MERGE /o /ld:\temp\master.log d:\pcb\dirc\dir10 d:\temp\master
MERGE /o /ld:\temp\master.log d:\pcb\dirc\dir11 d:\temp\master
MERGE /o /ld:\temp\master.log d:\pcb\dirc\dir12 d:\temp\master
MERGE /o /ld:\temp\master.log d:\pcb\dirc\dir13 d:\temp\master
MERGE /o /ld:\temp\master.log d:\pcb\dirc\dir14 d:\temp\master
MERGE /o /ld:\temp\master.log d:\pcb\dirc\dir15 d:\temp\master
MERGE /o /ld:\temp\master.log d:\pcb\dirc\dir16 d:\temp\master
MERGE /o /ld:\temp\master.log d:\pcb\dirc\dir17 d:\temp\master
MERGE /o /ld:\temp\master.log d:\pcb\dirc\dir18 d:\temp\master
MERGE /o /ld:\temp\master.log d:\pcb\dirc\dir19 d:\temp\master
MERGE /o /ld:\temp\master.log d:\pcb\dirc\dir20 d:\temp\master
MERGE /o /ld:\temp\master.log d:\pcb\dirc\dir21 d:\temp\master
MERGE /o /ld:\temp\master.log d:\pcb\dirc\dir22 d:\temp\master
MERGE /o /ld:\temp\master.log d:\pcb\dirc\dir23 d:\temp\master
MERGE /o /ld:\temp\master.log d:\pcb\dirc\dir24 d:\temp\master
MERGE /o /ld:\temp\master.log d:\pcb\dirc\dir25 d:\temp\master
MERGE /o /ld:\temp\master.log d:\pcb\dirc\dir26 d:\temp\master
MERGE /o /ld:\temp\master.log d:\pcb\dirc\dir27 d:\temp\master
MERGE /o /ld:\temp\master.log d:\pcb\dirc\dir28 d:\temp\master
MERGE /o /ld:\temp\master.log d:\pcb\dirc\dir29 d:\temp\master
MERGE /o /ld:\temp\master.log d:\pcb\dirc\dir30 d:\temp\master
MERGE /o /ld:\temp\master.log d:\pcb\dirc\dir31 d:\temp\master
MERGE /o /ld:\temp\master.log d:\pcb\dirc\dir32 d:\temp\master
MERGE /o /ld:\temp\master.log d:\pcb\dirc\dir33 d:\temp\master
MERGE /o /ld:\temp\master.log d:\pcb\dirc\dir34 d:\temp\master
MERGE /o /ld:\temp\master.log d:\pcb\dirc\dir35 d:\temp\master
MERGE /o /ld:\temp\master.log d:\pcb\dirc\dir36 d:\temp\master
MERGE /o /ld:\temp\master.log d:\pcb\dirc\dir37 d:\temp\master
MERGE /o /ld:\temp\master.log d:\pcb\dirc\dir38 d:\temp\master
MERGE /o /ld:\temp\master.log d:\pcb\dirc\dir39 d:\temp\master
MERGE /o /ld:\temp\master.log d:\pcb\dirc\dir40 d:\temp\master
MERGE /o /ld:\temp\master.log d:\pcb\dirc\dir41 d:\temp\master
MERGE /o /ld:\temp\master.log d:\pcb\dirc\dir42 d:\temp\master
MERGE /o /ld:\temp\master.log d:\pcb\dirc\dir43 d:\temp\master
MERGE /o /ld:\temp\master.log d:\pcb\dirc\dir44 d:\temp\master
MERGE /o /ld:\temp\master.log d:\pcb\dirc\dir45 d:\temp\master
MERGE /o /ld:\temp\master.log d:\pcb\dirc\dir46 d:\temp\master
MERGE /o /ld:\temp\master.log d:\pcb\dirc\dir47 d:\temp\master
MERGE /o /ld:\temp\master.log d:\pcb\dirc\dir48 d:\temp\master
MERGE /o /ld:\temp\master.log d:\pcb\dirc\dir49 d:\temp\master
MERGE /o /ld:\temp\master.log d:\pcb\dirc\dir50 d:\temp\master
MERGE /o /ld:\temp\master.log d:\pcb\dirc\dir51 d:\temp\master
MERGE /o /ld:\temp\master.log d:\pcb\dirc\dir52 d:\temp\master
MERGE /o /ld:\temp\master.log d:\pcb\dirc\dir53 d:\temp\master
MERGE /o /ld:\temp\master.log d:\pcb\dirc\dir54 d:\temp\master
MERGE /o /ld:\temp\master.log d:\pcb\dirc\dir55 d:\temp\master
MERGE /o /ld:\temp\master.log d:\pcb\dirc\dir56 d:\temp\master
MERGE /o /ld:\temp\master.log d:\pcb\dirc\dir57 d:\temp\master
MERGE /o /ld:\temp\master.log d:\pcb\dirc\dir58 d:\temp\master
MERGE /o /ld:\temp\master.log d:\pcb\dirc\dir59 d:\temp\master
MERGE /o /ld:\temp\master.log d:\pcb\dirc\dir60 d:\temp\master
MERGE /o /ld:\temp\master.log d:\pcb\dirc\dir61 d:\temp\master

::
:: THE END
:: And after 2100 lines we're DONE!!!!!!  Unless you're feeling energetic and
:: want to check the log and/or trash files to see if the descriptions that
:: were removed as duplicates are in fact really duplicates and not different
:: programs with the same name.  See TRICKS for how MERGE can selectively weed
:: out obvious duplicates from the trash files, shrinking them so they are more
:: manageable and easier to examine, and how to replace a kept description in a
:: lower numbered DIR with a longer or more recent one that was stripped from a
:: higher numbered DIR (the "/1M" switch).  For a description of MERGE's "/1S"
:: switch, which deletes the "happy face" first occurrence description from a
:: trash file, look at CRSDUPE1.BAT just above REMOVE CROSS FILE DUPLICATES.

:: To get a list of all the duplicate file names, merge the trash files (there
:: may be 121 of them:  CROSSDUP.D2 to 61 and DIR1 to 61.DUP).  The CROSSDUP.D?
:: descriptions need to be sorted first (except CROSSDUP.D2, since it was only
:: "compared" once).  However, they won't need sorting if the "compares" above
:: were modified to be like the DIR60 and DIR61 compares in CRSDUPE1.BAT.  When
:: the "crossdup" trash files are ready, merge all the trash files together:

:: MERGE dir1.dup dir2.dup all.dup
:: MERGE /o dir3.dup all.dup
:: etc.  ALL.DUP may have the "marked" first occurrence descriptions that were
:: originally kept, but that isn't important here since you're just after the
:: file names.  After they are all merged, copy ALL.DUP to another file (e.g.,
:: DUPE2) and merge them together with the trash file parameters +k+n:

:: MERGE all.dup dupe2 /tduplicat.nam+k+n.
:: Since every name will be duplicated, the trash file will be a list of your
:: duplicate file names, which may be useful for checking that there is only
:: one occurrence of the file on your hard drive or between your hard drive and
:: CD-ROMs (just make sure the file you keep matches the DIR description,
:: otherwise someone could download SERIAL.ZIP, expecting a programming aid but
:: instead getting a serial port checker).  You can use the same technique to
:: get a list of just file names for all the files you have on-line by copying
:: the master list to another name and merging them with trash's +k+n.

:END
[ RETURN TO DIRECTORY ]