• Login
Community
  • Login

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

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
5 Posts 2 Posters 373 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.
  • A
    afk afk
    last edited by Sep 11, 2023, 3:13 PM

    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

    P 1 Reply Last reply Sep 11, 2023, 3:16 PM Reply Quote 1
    • P
      PeterJones @afk afk
      last edited by Sep 11, 2023, 3:16 PM

      @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
      • A
        afk afk
        last edited by Sep 11, 2023, 5:16 PM

        Test reply

        1 Reply Last reply Reply Quote 0
        • A
          afk afk
          last edited by Sep 11, 2023, 5:20 PM

          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
          • A
            afk afk
            last edited by afk afk Sep 11, 2023, 5:24 PM Sep 11, 2023, 5:21 PM

            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
            5 out of 5
            • First post
              5/5
              Last post
            The Community of users of the Notepad++ text editor.
            Powered by NodeBB | Contributors