3-way Folder comparison - HomeBrew solution

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jjdacl
    New User
    • Aug 2009
    • 1

    3-way Folder comparison - HomeBrew solution

    Hi,

    I'm a long time user of BC2 and upgraded to BC3 yesterday because I have to do a 3-way folder comparison of some code. I think the 3-way text merge is awesome, but BC3 really needs the same thing for folders!

    So I've written a little app to let you do just that! :-)

    It's written in VB.Net, so if it doesn't run, please install the .Net runtimes. I apologise if there are any bugs, but I've tested it quite a bit and I'm happy to release it to the community as freeware.

    Basically, just select the three folders you want to compare and press the "Compare" button. Comparison is done using BC3's BComp.com command line option (unless the file sizes are different, in which case it doesn't bother). Once the folders are compared the results are shown and you can just double click any file in the list to launch BC3 in 3-way mode :-)

    If the files are identical they don't show in the list.

    Make sure to set the correct path to BC3 in the .config file; you can also set the initial default folders in there too.

    --
    James.

    [update] Fixed BC3 launch to load files in correct order (left,right,center).
    Last edited by jjdacl; 28-Aug-2009, 10:49 AM.
  • Michael Bulgrien
    Carpal Tunnel
    • Oct 2007
    • 1772

    #2
    Nice little app. Thanks.

    A 3-way merge also needs an output folder. Now, if you add a fourth pane to your app so that the user can identify the output folder, then add a Merge button to programatically merge each file using BComp and place the results in the output folder (except for file sets with conflicts) then you would have a 3-way folder merge instead of just a 3-way folder compare. And...the user would only need to launch the BC3 GUI for 3-way merges that failed due to conflicts.

    I've done all of this using scripts run from the command line, but never contained it in a tidy little GUI like you have. I am sure that others will find it useful until the Scooter team gets the functionality built in.
    BC v4.0.7 build 19761
    ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

    Comment

    • getbc
      New User
      • Oct 2009
      • 2

      #3
      really good! it seems I also need to make one for my self.
      wonder why Scooter team no make one for it? and inti it with CVS,

      Comment

      • wacnstac
        New User
        • Feb 2010
        • 1

        #4
        Now if it would just plug into Windows Explorer like Beyond Compare does for comparing two folders.....

        Comment

        • zlev
          Visitor
          • Oct 2009
          • 3

          #5
          application does not work on new versions of Beyond compare. Have you updated version?

          Comment

          • Michael Bulgrien
            Carpal Tunnel
            • Oct 2007
            • 1772

            #6
            This app still works with the most current Windows version of Beyond Compare. Note that, if you are running a 64-bit version of Windows, then you will need to update the BC3Path key in the BC3Folders.exe.config file.
            BC v4.0.7 build 19761
            ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

            Comment

            • zlev
              Visitor
              • Oct 2009
              • 3

              #7
              in last versions, when bc3folders calls bcompare to compare files visually, it opens 2 panels; One panel is not appears. In old versions of bc 3 panels opened;

              Comment

              • darkfader
                Visitor
                • May 2008
                • 9

                #8
                Another solution

                Hi. I made a simple solution of my own before I saw this thread. It's a simple cmd-script that figures out the directory for the selected file and then invokes bcomp.exe.
                You need to change the left/right/center/output directory names in the script file. You can have multiple projects too.
                You can call the script from the explorer context-menu (which BC also has btw) for a file in one of the directories.

                Comment

                • Aaron
                  Team Scooter
                  • Oct 2007
                  • 15997

                  #9
                  Thanks for the submission of a one-click approach, darkfader.

                  For other users interested in adding Text Merge to their right-click context menu, BC3 does offer built-in support under the Tools menu -> Options dialog, Startup, Explorer Integration section. Our built-in Merge support requires the user to select each of the 3 files individually or all at once for the Merge.
                  Aaron P Scooter Software

                  Comment

                  • mlkuhnpdx
                    New User
                    • Sep 2011
                    • 2

                    #10
                    Aaron, I tried your solution but "Merge" did not show up on the Explorer context menu. I tried selection files but it would only accept two files. Do I need to restart my computer for this to take effect? Thanks.

                    Comment

                    • mlkuhnpdx
                      New User
                      • Sep 2011
                      • 2

                      #11
                      Does Scooter plan to add this three-way folder merge feature to BC, and if so, do you have a timeframe for its availability? I have a need now and I'm a long-time BC user from version 1, but I'm trying UltraCompare to see how it does.

                      Comment

                      • Aaron
                        Team Scooter
                        • Oct 2007
                        • 15997

                        #12
                        Hello,

                        You would need to make sure the "Merge" option is enabled in the Options dialog -> Start-up section. It is one of the disabled sections by default.
                        Aaron P Scooter Software

                        Comment

                        • Aaron
                          Team Scooter
                          • Oct 2007
                          • 15997

                          #13
                          Hello,

                          Folder Merge is something we are working on, but we do not have a timeframe to offer at this time.
                          Aaron P Scooter Software

                          Comment

                          • Michael Bulgrien
                            Carpal Tunnel
                            • Oct 2007
                            • 1772

                            #14
                            FYI - UltraCompare has a 3-way compare mode... but not a 3-way merge. To understand the difference, see this prior post.
                            BC v4.0.7 build 19761
                            ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

                            Comment

                            • gregsohl
                              Visitor
                              • May 2010
                              • 4

                              #15
                              James, any chance of releasing the source for your homebrew 3-way folder merge solution?

                              Comment

                              Working...