BBS: Inland Empire Archive Date: 03-17-93 (16:43) Number: 328 From: EARL MONTGOMERY Refer#: NONE To: ALL Recvd: NO Subj: ELIMDUPE part 3 of 4 Conf: (2) Quik_Bas
'Msg#: 3 >>>>>> Continued from last message: ELIMDUPE.BAS >>>>>>> WEND DEF SEG de2 = de2 + 1 f2.nam$(de2) = f2.name$ inregs.ax = &H4F00 CALL interruptx(&H21, inregs, outregs) cy = outregs.flags AND 1 WEND IF i = 0 THEN END IF IF de1 > de2 THEN endofloop = de1: ELSE endofloop = de2 FOR x = 1 TO endofloop FOR Y = 1 TO endofloop IF f1.nam$(x) = f2.nam$(Y) THEN GOSUB duplicatefound NEXT: NEXT GOTO exitorcontinue delete: tryagain: LOCATE 10, 4: PRINT STRING$(40, " ") LOCATE 11, 4: PRINT STRING$(40, " ") LOCATE 12, 4: PRINT STRING$(40, " ") LOCATE 10, 4: PRINT "(1) "; n1$; : PRINT " (2) " + n2$ LOCATE 11, 4: PRINT "Duplicate File Name "; : PRINT f1.nam$(x) LOCATE 12, 4: INPUT "From which directory (1 or 2)"; dn IF dn = 1 THEN path$ = drive$ + n1$ + CHR$(0) IF dn = 2 THEN path$ = drive$ + n2$ + CHR$(0) IF dn <> 1 AND dn <> 2 THEN BEEP: GOTO tryagain inregs.es = -1 inregs.ax = &H3B00 inregs.ds = VARSEG(path$) inregs.dx = SADD(path$) CALL interruptx(&H21, inregs, outregs) KILL temp$ RETURN fatalerror: BEEP: CLS PRINT "Error is code "; : PRINT ERR PRINT "Fatal error returning to DOS" SLEEP (2) path$ = drive$ + tempdir$ + CHR$(0) inregs.es = -1 inregs.ax = &H3B00 inregs.ds = VARSEG(path$) inregs.dx = SADD(path$) CALL interruptx(&H21, inregs, outregs) CLS : SCREEN 0: SYSTEM duplicatefound: LOCATE 10, 4: PRINT STRING$(40, " ") LOCATE 11, 4: PRINT STRING$(40, " ") LOCATE 12, 4: PRINT STRING$(40, " ") IF n1$ = "" THEN LOCATE 10, 4: PRINT "C:\" ELSE LOCATE 10, 4: PRINT n1$; IF n2$ = "" THEN LOCATE 10, 20: PRINT "C:\" ELSE LOCATE 10, 20: PRINT n2$ LOCATE 11, 4: PRINT f1.nam$(x); : LOCATE 11, 20: PRINT f2.nam$(Y) temp$ = f1.nam$(x) LOCATE 12, 4: INPUT "Delete one of these files"; q$ q$ = UCASE$(q$): IF q$ = "Y" THEN GOTO delete: ELSE RETURN exitorcontinue: CLS PRINT "No duplicates found or all duplicates have been processed." INPUT "Do you wish to check other directories"; q$ q$ = UCASE$(q$) ' >>>>>>> Continued on next message >>>>>>> --- Maximus 2.01wb * Origin: Rabbit and Snake's BBS - Richardson, Texas (1:124/6108)
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