Double-click to open file from Windows Explorer broken
-
I have associated NotePad++ with .txt files in Windows 10 Explorer. When I double-click those files, I get a “(Filename) doesn’t exist. Create it?” message for every piece of the filename that is separated by spaces.
If I associate the .txt files back to Windows Notepad, even files with spaces in the name open normally.
This was not a problem in the past that I know; I’m using NotePad++ v7.5.9 (32-bit)…I looked but didn’t see an answer to this problem so I apologize if it has already been asked/answered. Thank you!!!
-
The association was created wrong. To fix it, you need to edit your registry, which is something that you may or may not be willing to do (for system stability reasons) or able to do (for “I am not an Administrator”) reasons.
This post shows an export from my registry, where the entry puts quotes around the
%1
: in the registry export (.reg
file), it shows up as\"%1\"
; in the registry itself, you would see it as"%1"
.To check whether this is really the problem you are having, you can open up your registry (
regedit.exe
), and navigate toHKEY_CLASSES_ROOT\.txt
. The(Default)
entry on the right will show you the name of the entry: in my case, it’stxtfile
. Then navigtate toHKEY_CLASSES_ROOT\txtfile
(or whatever), and continue deeper intotxtfile
’sshell
key. You will see a list of possible commands. one of them has acommand
key for Notepad++. Look at the(Default)
for that command key, and make sure the%1
(or%L
) is surrounded by quotes. -
Thanks Peter; you put me on the right track; the actual registry change that fixed it was made here (by adding the quotes):
[HKEY_CLASSES_ROOT\Applications\notepad++.exe\shell\open\command]
@="C:\Program Files (x86)\Notepad++\notepad++.exe “%1"”Thanks again for your help!!!