Community
    • Login

    .TXT filenames don't get passed to NotePad++

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    5 Posts 2 Posters 360 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.
    • afk afkA
      afk afk
      last edited by

      In Windows 10 I have the .TXT file extension set to be opened by NotePad++. If I invoke NP++ and select a .txt file from the Open menu the file opens OK. But if I type (or select from File Manager) TextFile.txt, NotePad++ executes but opens a blank page. The debug info shows that the command line is empty. This happens only on .TXT files. The lack of a command-line parameter being passed would seem to be a Windows problem but I couldn’t find a problem there. Here’s the debug info after entering “TextFile.txt” in the command line processor.

      Notepad++ v8.5.7 (64-bit)
      Build time : Sep 6 2023 - 23:13:49
      Path : c:\Program Files\NotePad++\NotePad++.exe
      Command Line :
      Admin mode : ON
      Local Conf mode : OFF
      Cloud Config : OFF
      OS Name : Windows 10 Home (64-bit)
      OS Version : 22H2
      OS Build : 19045.3324
      Current ANSI codepage : 1252
      Plugins :
      ComparePlugin (2.0.2)
      mimeTools (2.9)
      NppConverter (4.5)
      NppExport (0.4)

      Thanks for any attention to this. afk

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

        @afk-afk said in .TXT filenames don't get passed to NotePad++:

        would seem to be a Windows problem but I couldn’t find a problem there

        It’s most likely in your registry somewhere. I would look into the various .txt registry entries, and make sure they point to "c:\Program Files\notepad++\notepad++.exe" "%1" or similar (without that %1, it won’t work; without the quotes around the %1, it won’t work if there are spaces in the path).

        1 Reply Last reply Reply Quote 2
        • afk afkA
          afk afk
          last edited by

          Test reply

          1 Reply Last reply Reply Quote 0
          • afk afkA
            afk afk
            last edited by

            Hi PeterJones,
            Your help worked. It was a registry problem.
            The site is giving me a hard time about replying. It tells me that I can’t use links. So I’m trying various test replys such as this one.
            It might take time to get it right.
            afk

            1 Reply Last reply Reply Quote 1
            • afk afkA
              afk afk
              last edited by afk afk

              OK!! (maybe)

              You were right. I found the registry entry
              \HKEY_LOCAL_MACHINE\SOFTWARE\Classes\txtfile\shell\open\command
              with the entry
              //“c:\Program Files\NotePad++\NotePad++.exe”
              and added “%1” and it worked first time, every time.
              Thanks very much.
              I tried to upvote your answer but I don’t have enough “reputations”
              Austin Kelly

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