ELIMDUPE part 1 of 4 part

 BBS: Inland Empire Archive
Date: 03-17-93 (16:38)             Number: 326
From: EARL MONTGOMERY              Refer#: NONE
  To: ALL                           Recvd: NO  
Subj: ELIMDUPE part 1 of 4 part      Conf: (2) Quik_Bas
'This program finds duplicates in the selected directories and
'gives you the oppurtunity to delete. It can also work on just
'one directory and allow you to delete files within that
'directory. I think it is pretty neat. Try it out.

'$INCLUDE: 'qb.bi'
DEFINT A-Z
DIM f1.nam$(500) 'Make as large as you need
DIM f2.nam$(500)
DIM f1.name$(500)
DIM f2.name$(500)
drive$ = "C:\"
ON ERROR GOTO fatalerror
KEY(10) ON
ON KEY(10) GOSUB exitroutine
DIM inregs AS regtypex, outregs AS regtypex
REM Saving the current directory
tempdir$ = STRING$(64, " ")
inregs.es = -1
inregs.ax = &H4700
inregs.dx = 0
inregs.ds = VARSEG(tempdir$)
inregs.si = SADD(tempdir$)
CALL interruptx(&H21, inregs, outregs)
tempdir$ = LEFT$(tempdir$, INSTR(tempdir$, CHR$(0)) - 1)
restart:
CLS
DEF SEG = &HB800
COLOR 14
POKE 0, 201
FOR x = 2 TO 158 STEP 2: POKE x, 205: NEXT
POKE 158, 187
FOR x = 160 TO 3880 STEP 160: POKE x, 186: NEXT
POKE 3840, 200
FOR x = 3842 TO 4000 STEP 2: POKE x, 205: NEXT
FOR x = 3998 TO 160 STEP -160: POKE x, 186: NEXT
POKE 3998, 188
DEF SEG
firstinput:
LOCATE 2, 30: PRINT "Eliminate Dupes"
LOCATE 3, 28: PRINT "By Earl Montgomery"
LOCATE 4, 20: PRINT "Written entirely in Quick Basic 4.5"
LOCATE 6, 15: PRINT "Press <ENTER> at any directory prompt for C:\"
LOCATE 10, 4: PRINT STRING$(40, " ")
LOCATE 11, 4: PRINT STRING$(40, " ")
LOCATE 10, 4: INPUT "Name of first directory"; n1$
n1$ = UCASE$(n1$)
path$ = drive$ + n1$ + CHR$(0)
REM changing directories
inregs.es = -1
inregs.ax = &H3B00
inregs.ds = VARSEG(path$)
inregs.dx = SADD(path$)
CALL interruptx(&H21, inregs, outregs)
IF outregs.ax = 3 THEN GOSUB invaliddirectory1: GOTO firstinput
GOSUB begin
secondinput:
LOCATE 10, 4: PRINT STRING$(40, " ")
LOCATE 11, 4: PRINT STRING$(40, " ")
LOCATE 10, 4: INPUT "Name of second directory"; n2$
n2$ = UCASE$(n2$)
' >>>>>>> Continued on next message >>>>>>>

--- Maximus 2.01wb
 * Origin: Rabbit and Snake's BBS - Richardson, Texas (1:124/6108)
Outer Court
Echo Basic Postings

Books at Amazon:

Back to BASIC: The History, Corruption, and Future of the Language

Hackers: Heroes of the Computer Revolution (including Tiny BASIC)

Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution

The Advent of the Algorithm: The Idea that Rules the World

Moths in the Machine: The Power and Perils of Programming

Mastering Visual Basic .NET