Community
    • Login

    starting npp++ via batchfile

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    6 Posts 3 Posters 1.7k 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.
    • tseGITT
      tseGIT
      last edited by

      (Win10 with npp32-7.8.9)
      maybe I’m to much old school but I frequently use batchfiles (.cmd) to load some files into npp. But allthough the opening command call “C:\Program Files (x86)\Notepad++\notepad++.exe” %userprofile%\abc.txt is executed npp doesn’t open. If npp is already opened with this file or any other file(s) the identical call / batchfile opens abc.txt in npp. I tried timeout.exe /T 1 or things lkike that, but that all doesn’t work.
      Not guaranteed, but i think it is a problem since npp 7.8.9.

      Alan KilbornA 1 Reply Last reply Reply Quote 0
      • Alan KilbornA
        Alan Kilborn @tseGIT
        last edited by

        @tseGIT

        Maybe there’s a lot of us “old schoolers” around. :-)

        Every single time I start N++, it is through a batch file (or two, called in sequence – hey, I’m “special needs”, right?).
        If I launch it from my taskbar icon, it is through a batch file.
        Every time I Explorer right-click start N++, it is through a batch file.
        Every time I have my compare utility or my version control software auto-launch N++, it is through a batch file.
        And of course, these are all executing the same batch file(s).

        These are whether or not I already have N++ running.
        It makes no difference.
        It always works.
        It always opens the intended file (if launched where instructed to do so).

        So…there is no “problem” with Notepad++ regarding this.

        I don’t know that this is the problem for you, but I’m suspicious of the call in your command line. It seems like it would be “okay”, but it doesn’t seem necessary anyway so I would try removing it as a first step.

        1 Reply Last reply Reply Quote 1
        • tseGITT
          tseGIT
          last edited by

          thx to Alan, but that’s not the problem. I need the call using 32-Bit npp++. Otherwise batch-execution waits until i exit the “first” npp before continuing an try to open the next file.

          BUt I have now detected that there is a problem with the “one-instance-mode”. If I change to multi-instance-mode all runs fine.
          But then for each file there is a new notepad window. And this handling is worse the handling of multiple files in the one-instance-mode which i prefer.
          I think it’s a bug (since 7.8.9 / 7.8.8), but i’m not able to describe or show logs to proof this statement. I’m not allowed to change my notepad version to a former one so I can’t check this.

          1 Reply Last reply Reply Quote 0
          • EkopalypseE
            Ekopalypse
            last edited by

            @tseGIT

            I’m using 7.8.9 - Multi-Instance is set to default(mono-instance).
            Using this batch file

            @echo off
            
            start "D:\PortableApps\Npp\notepad++.exe" "d:\logit.txt"
            

            seems to do what you want to be done. Starts npp if not started and loads file if not loaded.

            1 Reply Last reply Reply Quote 1
            • tseGITT
              tseGIT
              last edited by

              SOLVED
              At least I enterered event-Manager and found a lot of crash reports for notepad++.
              Checking the details there are alwayn shows problems with the HexEditor - Plugin 0.9.5.0. After removing this dll from the plugin folder all works fine. So it seems that notepad++ 7.8.9 (32-Bit) is not working together with HexEditor.
              Since I almost never use the HexEditor that doesn’t hurt.

              thx for help and input

              Alan KilbornA 1 Reply Last reply Reply Quote 3
              • Alan KilbornA
                Alan Kilborn @tseGIT
                last edited by

                @tseGIT

                Ah, so it wasn’t call or start at all?
                It was the HexEditor plugin.
                Maybe that should be the first debug question with all problems, “Are you using the HexEditor plugin?” It seems to cause a good number of strange issues.

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