QB64 Phoenix Edition
Another Dir/File compare function. - Printable Version

+- QB64 Phoenix Edition (https://qb64phoenix.com/forum)
+-- Forum: QB64 Rising (https://qb64phoenix.com/forum/forumdisplay.php?fid=1)
+--- Forum: Code and Stuff (https://qb64phoenix.com/forum/forumdisplay.php?fid=3)
+---- Forum: Utilities (https://qb64phoenix.com/forum/forumdisplay.php?fid=8)
+---- Thread: Another Dir/File compare function. (/showthread.php?tid=3367)



Another Dir/File compare function. - eoredson - 01-11-2025

Find attached a dir/file compare utility which has the following:

Code: (Select All)
The Compare utility v1.0a QB64 source PD 01/15/2025.

This utility has 2 functions, one for directories and one for filenames.

The main menu starts with:

  Dir/File compare utility.

  Enter (D)ir/(F)ile/(Q)uit?

  Where:

    D  --  compares the equivalency of 2 directories.

      Also prompts: Count only(y/n)?
        to count the dirs without display.

    F  --  compare the difference of 2 filenames.

      Also prompts: List only(y/n)?
        to list all mismatched bytes.

  Note: Includes a realtime statusline and a Control-Break trap.

    Due to the large buffer this utility can compare two 10MB files
    in less than a second.

    During file compare the percentage of completion is displayed.

    The filename also displays the byte position and values that do not match:

      Offset        Byte  Hex    ASCII
      ------------  ----  -----  -------
      1024          F\E   0F\0E  070\069

-end-

  Internal:
    Function to get directory:
      D$ = _SelectFolderDialog$("Enter directory", _CWD$)
    Function to get filename:
      F$ = _OpenFileDialog$("Enter file", _CWD$)

-end-