Community
    • Login

    Create File? message

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    4 Posts 2 Posters 117 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.
    • Nostra DamusN
      Nostra Damus
      last edited by

      When I open some text files in notepad++ it comes up with a message saying “xyz path does not exist. Create it?” is there any way to stop this as it seems pointless to me as nothing seems to happen if I click ‘yes’ or ‘no’.

      PeterJonesP 1 Reply Last reply Reply Quote 0
      • PeterJonesP
        PeterJones @Nostra Damus
        last edited by

        @Nostra-Damus said in Create File? message:

        is there any way to stop this

        Don’t pass files that don’t exist to the notepad++ command line.

        Or, if you are running it from the command line, and the path has a space in it, put it in quotes:

        "c:\program files\Notepad++\notepad++.exe" "c:\path to file\with spaces\filename.txt"
        

        If you are getting that error when you right click on an existing file, then please go to ?-menu’s Debug Info after you say “no” to the message, and copy/paste that debug info into your reply: it will help us debug if you have a Windows file association that isn’t properly quoting filenames.

        as it seems pointless to me as nothing seems to happen if I click ‘yes’ or ‘no’.

        If you say “No”, then “nothing” happens because you told it to not create the file. But something actually happens: it did what you said. Specifically, there are two circumstances: if you said “no”, and it was the only file on the command line, and you had no files still open in your session, then it will just open Notepad++ normally with a new 1 file (the same as if you hadn’t supplied that path on the command line); if you said “no”, but you had other files on the command line that did exist, and/or you had a session with files which would normally be loaded, then those files would be opened, but the non-existent file wouldn’t have a tab (not even a new 1 tab).

        If you say “yes”, it creates a tab with that name, and if you type text and Save, it will use the path (assuming it was a valid path) as the default name, instead of prompting you to choose a directory/filename.

        1 Reply Last reply Reply Quote 1
        • Nostra DamusN
          Nostra Damus
          last edited by

          I usually just right-click on a file and select ‘open with notepad++’
          Debug from after it has done this and I clicked on ‘no’ to ‘create ?’ message.:

          Notepad++ v8.7.8 (64-bit)
          Build time : Mar 7 2025 - 20:39:25
          Path : C:\Utils\Notepad++\notepad++.exe
          Command Line : C:\Store\OpSys\Notes\activate (2).bat
          Admin mode : OFF
          Local Conf mode : ON
          Cloud Config : OFF
          Periodic Backup : OFF
          Placeholders : OFF
          Scintilla Rendering Mode : SC_TECHNOLOGY_DIRECTWRITE (1)
          Multi-instance Mode : monoInst
          File Status Auto-Detection : cdEnabledNew (for current file/tab only)
          Dark Mode : ON
          OS Name : Windows 11 Pro N (64-bit)
          OS Version : Dev
          OS Build : 27863.1000
          Current ANSI codepage : 1252
          Plugins :
          mimeTools (3.1)
          NppConverter (4.6)
          NppExport (0.4)

          PeterJonesP 1 Reply Last reply Reply Quote 0
          • PeterJonesP
            PeterJones @Nostra Damus
            last edited by PeterJones

            @Nostra-Damus said in Create File? message:

            I usually just right-click on a file and select ‘open with notepad++’

            Is it exactly Open with Notepad++, or is it actually Edit with Notepad++, or is it the Open With menu and chosing Notepad++?

            I ask, because I am trying to figure out if you are using the default Shell Extension that comes when you install Notepad++, which make the right-click menu command Edit with Notepad++, or whether you are using a custom registry entry / file association; or, maybe at some point, you just picked Open With > Notepad++, which might (IIRC) shorten to Open with Notepad++ in the main RightClick menu in future instances (I forget the exact text in a situation like that).

            Command Line : C:\Store\OpSys\Notes\activate (2).bat

            Okay, your filename has a space in it. If you were using Edit with Notepad++ from the Shell Extension, it shouldn’t have a problem with the space. That makes me think you’re using a custom entry (either manual file association, or using the Open With menu)

            If you right click and Open with Notepad++ on a file that has no spaces in the path, I am betting it wouldn’t give you the “Create File?” message.

            Local Conf mode : ON

            Okay, you didn’t do a normal installation, since you’re in portable mode. That means it’s probably not the Shell Extension, and thus probably explains the root cause of your problem: I am going to say that your file association / OpenWith is set up wrong.

            Run regedit.exe and search for notepad++.exe. You will probably find one or more entry that has a command with the value something like C:\Utils\Notepad++\notepad++.exe %1 . You should change the %1 to "%1" (ie, with quotes around it), because Windows requires quotes around the filename if there are spaces anywhere in the path. After you’ve changed all instances of that, log out of Windows and log back in (which will force Windows to use the updated file associations), and I’m guessing that will solve your “Create File?” message issue.

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