External diff program / compare tool

External diff program / compare tool

5
NewbieNewbie
5

    Jan 31, 2006#1

    Is it possible to setup a tool item within UltraEdit to call an external program with two parameters being the most recent and second most recent windows selected? Just like how the compare tool built into UE does.

    The reason I ask is I have Beyond Compare as my external diff program and I don't want to upgrade to UltraCompare.

    Thanks for your help.

    -Flynn

    63
    Advanced UserAdvanced User
    63

      Jan 31, 2006#2

      Hi Flynn

      I found this in the help file:
      UE help wrote:How can I use a different compare application?

      By default selecting the Compare Files command in the File menu invokes UltraEdit's own compare utility. If you prefer to use a different compare application you may do this by adding the following setting to the uedit32.ini file under the [Settings] section:

      Compare EXE="fully qualified path of EXE"

      This setting allows the user to specify a different File Compare program to be used in place of the standard utility provided with UltraEdit. If this is set, UltraEdit will use this EXE in place of its own utility. The only command line parameters passed to the utility will be the file names (with paths) of the files to be compared.
      So I'm guessing! By adding

      [Settings]
      Compare EXE=full name of the compare EXE


      you can get what you want. Please note that the full name of the compare EXE must be specified without double quotes even when the path contains 1 or more spaces.

      You might want to make a backup of your ini file before making changes.
      Cheap insurance and it beats that awful feeling I wish I would of done ...

      Good Luck

      5
      NewbieNewbie
      5

        Jan 31, 2006#3

        That worked. Thanks for the help.

        Guess I should RTFM next time.

        4
        NewbieNewbie
        4

          Sep 19, 2008#4

          I'm specifying a custom compare tool in the configuration file. When I click on the Compare Files button, a dialog window opens. Can I bypass this window and go straight to the comparison application?

          6,675585
          Grand MasterGrand Master
          6,675585

            Sep 20, 2008#5

            That is not possible with this method. UltraEdit need to know which files should be compared on running a compare of two text files. So UE always opens the standard dialog normally used for UC Professional or UC Lite even when using a different comparison tool because in this dialog the user can specify which files should be compared. Preset are always by UltraEdit the currently active file as first file and the previously active file as second file.

            If you want to run your compare tool with the current active file and select the second file later directly in the comparison tool you should configure a user tool - see the power tip Creating user and project tools.

            Be careful to configure the correct options for your comparison tool. I guess, it is a Windows program and not a DOS or 32-bit console application. The active file can be specified on the command line with "%f" - press button Help in the user tool configuration dialog to get more help about the options. A good idea would be to extract the first icon from your comparison tool (with the dimensions used in UltraEdit) for example with IrfanView and save it as BMP or ICO file and specify this file in the tool configuration dialog for your comparison tool. That would make it easier to identify your comparison tool in UE menu/toolbar.

            1
            NewbieNewbie
            1

              Mar 23, 2010#6

              It appears that the way UltraEdit passes the file arguments to the external diff program in version 16.00 has changed, so that now, the external diff tool chokes on file paths with spaces. Anyone know of a workaround?

              236
              MasterMaster
              236

                Apr 09, 2010#7

                Interesting. I wonder if this is related to a bug in UltraCompare where a command line invocation of uc.com garbles the commands passed to uc.exe if the file paths contain spaces. IDM have already acknowledged this; it's currently still there in UC 7.10.0.1010, but you can expect it to be fixed shortly.

                4
                NewbieNewbie
                4

                  Apr 09, 2010#8

                  I contacted IDM support about bad file arguments being passed to the external diff program and they said:
                  IDM wrote:Thanks for your message. We recently received another report of this and confirmed that this is an issue and actually has been since v15.20. This will be corrected in a future update, and I apologize for the inconvenience.

                    Aug 10, 2010#9

                    Using UltraEdit version 16.10.0.1042 on Windows 7 Enterprise, version 6.1, build 7600.

                    The Compare Files feature that used to work with an external diff tool in versions of UltraEdit prior to version 15.20 and stopped working correctly in version 15.20 (it did not pass filenames with spaces in the path properly) now does no more than call the executable and does not pass the file names at all!

                      Aug 10, 2010#10

                      I was trying to solve a problem with the default file open directory. Configuration > Directory > "Default open directory" was overriding Configuration > File Handling> Load > "Use active file directory for file open dialog default" on UE 16.10.0.1036. IDM support sent me special user verification build 16.10.0.1042.

                      I discovered external diff didn't work afterward. May have worked in build 1036. Support acknowledged that external diff was not working in build 1042. I am still awaiting a reply.

                      I checked external diff command line by configuring a batch file as the diff tool.
                      @echo off
                      echo %0 %1 %2 %3
                      pause

                      6,675585
                      Grand MasterGrand Master
                      6,675585

                        Aug 10, 2010#11

                        I tested that now also with UE v16.10.0.1036 by making UC Prof. not visible for UE and adding manually to uedit32.ini under section [Settings] the line

                        Compare EXE=C:\Temp\Compare Test.bat

                        The batch file with the space character in the name contained following lines:

                        Code: Select all

                        @echo off
                        echo %0 %1 %2
                        echo/
                        pause
                        As I executed the compare files command, the batch file echoed:

                        "C:\Temp\Compare Test.bat" C:\Temp\File1.txt C:\Temp\File2.txt

                        Unfortunately the issue with file names containing a space character is still not fixed and therefore calling the "batch compare tool" with the text files renamed to include a space character results in

                        "C:\Temp\Compare Test.bat" C:\Temp\File 1.txt

                        instead of

                        "C:\Temp\Compare Test.bat" "C:\Temp\File 1.txt" "C:\Temp\File 2.txt"

                          Sep 04, 2010#12

                          The problem with not enclosing the names of the two files in double quotes is fixed with UltraEdit v16.20.0.1009. Now also files with a space character anywhere within complete file name can be compared with an external tool called by UltraEdit because UltraEdit now double quotes always both file names.

                          But UltraEdit does not double quote now the name of the compare EXE itself as it has done in previous versions. While

                          [Settings]
                          Compare EXE=C:\Temp\Compare Test.bat


                          worked in previous versions of UltraEdit because the compare EXE was called by UltraEdit always with double quotes, this specification of the tool does not work anymore with UltraEdit v16.20. Either the full name of the compare EXE does not contain a space character, for example by using short name in 8.3 format, or the compare EXE is specified in uedit32.ini with

                          [Settings]
                          Compare EXE=
                          ""C:\Temp\Compare Test.bat""

                          I have not made a typing mistake here. There must be twice two double quotes at beginning and end of the full name of the compare EXE. The outer double quote pair is always automatically removed on reading the string value from uedit32.ini.

                          2
                          NewbieNewbie
                          2

                            Nov 19, 2020#13

                            Returning after a five year hiatus in project management back to programing. In an earlier version (UEStudio v13) you could swap out UltraCompare by adding

                            Code: Select all

                            Compare EXE = "path\to\external\compare\program"
                            to the uestudio.ini file.  This no longer seems to work in the currently latest UEStudio version 20.10. Am I correct in assuming that this feature has been removed?

                            6,675585
                            Grand MasterGrand Master
                            6,675585

                              Nov 19, 2020#14

                              It is still possible to use a different application than UltraCompare for comparing files in UEStudio 20.10.

                              The file %APPDATA%\IDMComp\UEStudio\uestudio.ini is no longer used by UES v20.10. If uestudio.ini still exists from an older installation of UEStudio, it can be deleted if there is no plan to uninstall UES v20.10 and reinstall the older version of UES.

                              The file to add manually while UEStudio is not running is now: %APPDATA%\IDMComp\UEStudio\ues.ini

                              There must be added to section [Settings] the line:

                              Compare EXE="C:\Full path\to the\Compare.exe"

                              Please note that there are no spaces around the equal sign.

                              I tested that with a batch file C:\Temp\Compare Test.bat containing just the command line @echo %0 %*&pause
                              Best regards from an UC/UE/UES for Windows user from Austria

                              2
                              NewbieNewbie
                              2

                                Nov 23, 2020#15

                                Thanks very much. That was it, I had spaces around the '='.