Community
    • Login

    Open Notepad++ and do filecompare

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    4 Posts 3 Posters 685 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Han KortekaasH
      Han Kortekaas
      last edited by

      We want to open Notepad++ with a commandline (using cmd or PowerShell) in order to compare two files.
      Any suggestions?
      regards
      Han

      Michael VincentM 1 Reply Last reply Reply Quote 0
      • Michael VincentM
        Michael Vincent @Han Kortekaas
        last edited by

        @Han-Kortekaas said in Open Notepad++ and do filecompare:

        We want to open Notepad++ with a commandline (using cmd or PowerShell) in order to compare two files.
        Any suggestions?

        The Compare plugin used to be able to do this:
        https://stackoverflow.com/questions/20170541/running-notepad-from-command-line-with-compare-plugin-showing-compare-result

        But I have the latest Notepad++ and Compare plugin and the compare.exe no longer seems to be included.

        Maybe a macro or a PythonScript startup script could help here?

        Cheers.

        PeterJonesP 1 Reply Last reply Reply Quote 1
        • PeterJonesP
          PeterJones @Michael Vincent
          last edited by PeterJones

          @Michael-Vincent said in Open Notepad++ and do filecompare:

          Maybe a macro or a PythonScript startup script could help here?

          (Linking to the old sourceforge page is not the best place to start; that site is very out of date, compared to the PythonScript v1.5.4 that you can get from the Plugins Admin. The github PythonScript mainpage is probably a better link for the plugin.)

          @Han-Kortekaas ,

          If you want to use PythonScript to call a plugin command, you should probably start with @Ekopalypse’s -z command line processing example . The -z, as described in the online usermanual allows you to separate extensions command-line arguments, so Notepad++ will ignore any options after that, but plugins can see them in the command line and trigger some action. @Ekopalypse’s example showed launching the menu command View > Monitoring…, but you can also use the same technique but the notepad.runPluginCommand() to run a specific plugin command, like enabling compare on the two opened files.

          1 Reply Last reply Reply Quote 3
          • Han KortekaasH
            Han Kortekaas
            last edited by

            Michael and Peter, thanks we’ll look in to that

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            The Community of users of the Notepad++ text editor.
            Powered by NodeBB | Contributors