Can't open files with spaces in name



  • 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?



  • 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"
    


  • @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



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


Log in to reply