Community
    • Login

    Can't open files with spaces in name

    Scheduled Pinned Locked Moved General Discussion
    4 Posts 3 Posters 1.2k 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.
    • toubeptT
      toubept
      last edited by

      If a file is named something like “myfile copy.php”, it won’t open. Notepad++ displays three messages asking to create the file. Each message has part of the original name, like “myfile”, " " and “copy”. I have a program that creates names like that when I copy them. Is there a way to load them without editing the names?

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

        How are you trying to open it? Right-click and open from Explorer should work just fine. You just need to put double-quotes around the name from a command prompt.

        C:\> notepad++.exe "myfile copy.php"
        
        1 Reply Last reply Reply Quote 2
        • PeterJonesP
          PeterJones
          last edited by

          @toubept ,

          My guess is that your file association is wrong, and is running notepad++ with the arg %1 rather than "%1" (with the quotes).

          You probably should search through your registry, and find instances of notepad++ or notepad++.exe, looking for any that don’t put the quotes around the %1; any that you find, you should change to have the quotes.

          It’s like to look something like:

          • "c:\program files\notepad++\notepad++.exe" %1 => "c:\program files\notepad++\notepad++.exe" "%1"
          • "c:\program files (x86)\notepad++\notepad++.exe" %1 => "c:\program files (x86)\notepad++\notepad++.exe" "%1"

          … or similar

          1 Reply Last reply Reply Quote 3
          • toubeptT
            toubept
            last edited by

            @PerterJones That was it. Thank you very much. :)

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