COLOR 17, 15: CLS : i = 0 OPEN "DIR-LIST" FOR INPUT AS #1 `Get DIR-LIST data DO: i = i + 1: LINE INPUT #1, f$(i) LOOP UNTIL EOF(1) OR i = 8 `Read max of 8 lines CLOSE #1 f$(7) = MID$(f$(7), 10, 9) `Get number of files & f$(8) = MID$(f$(8), 10, 8) `number of directories IF f$(7) = "1 file(s)" AND f$(8) = "0 dir(s)" THEN `A file has been selected path$ = MID$(f$(4), 15) `Get path to file IF LEN(path$) > 3 THEN path$ = path$ + "\" file$ = MID$(f$(6), 45) `Get file name selected$ = CHR$(34) + path$ + file$ + CHR$(34) GOSUB MakeCommandLine ELSE `Else a directory has been selected SHELL "C:\Windows\Notepad.exe DIR-LIST" `Display END IF: SYSTEM MakeCommandLine: OPEN "TEMP.LST" FOR APPEND AS #1 PRINT #1, selected$ `Add selected file to list CLOSE #1: j = 0 OPEN "TEMP.LST" FOR INPUT AS #1 `Count the files DO: j = j + 1: LINE INPUT #1, pathfile$(j) PRINT j; pathfile$(j): SOUND 500 \ j, 5 LOOP UNTIL EOF(1) OR j = 2 `Read max 2 lines CLOSE #1: SLEEP 2 `Display for 2 seconds IF j = 1 THEN RETURN `First file selected `_______________________________________________ IF j = 2 THEN `First & Second files selected KILL "TEMP.LST" `Finished with TEMP.LST IF pathfile$(1) = pathfile$(2) THEN OPEN "RESULTS" FOR OUTPUT AS #1 PRINT #1, "File Selected = "; pathfile$(1) PRINT #1, "ERROR Same File Selected Twice" CLOSE #1 ELSE REM `'' Means type the code on ONE line! REM DON'T type the `'' characters `'' cmd$ = "C:\Windows\Command\Fc.exe " + pa `''thfile$(1) + " " + pathfile$(2) + " >RESULTS" GOSUB ExecuteCommandLine END IF `Display the RESULTS message in Notepad SHELL "C:\Windows\Notepad.exe RESULTS" END IF RETURN ExecuteCommandLine: `Put cmd$ into a batch program OPEN "TEMP.BAT" FOR OUTPUT AS #1 PRINT #1, "@echo off": PRINT #1, cmd$ CLOSE #1: SHELL "TEMP.BAT" `Run batch program KILL "TEMP.BAT" `Delete batch program RETURN