No announcement yet.

Use BC4 to "guess" moves/renames?

  • Filter
  • Time
  • Show
Clear All
new posts

  • Use BC4 to "guess" moves/renames?

    I want to programmatically compare two baselines of a file tree.
    I know what files/directories (hereafter "elements") have disappeared, and what have been added.
    In some cases, this is due to an element being renamed/moved (hereafter "moved").
    I want to detect whether an element has (probably) been moved, i.e. similar to what Git does.
    Doing this if a 100% match is simple (just compare element name and checksums), but trickier when the files are "almost" the same.
    My question is, could BC4 be used for this?
    It already does folder comparisons. It already has means to define "almost identical" by ignoring "unimportant" changes.
    It already has a CLI.
    I browsed the CLI documentation, but couldn't find any obvious solution.



  • #2

    BC4's alignment requires equal naming conventions to align the items. If they have been renamed, then they can't 'guess' an alignment. We do have a couple of features that can help in specific cases.

    BC4 Pro's Alignment Overrides feature can define a rule for the equal text in the file name, and explicit text for any difference in the name, and align them. If licensed for Std, you can try Pro with this guide:

    Also, the View menu -> Ignore Folder Structure will remove all subfolders from view, and align only file names. If the file names are still equal but moved, and are unique, then placing them all in a single file bucket could find and align them.
    Aaron P Scooter Software