DIRECTORY already exists. Do you want to replace it?
-
So I’m in the “Save as…” dialog, and I want to change into some sub-directory “foo” that already exists so I can save my file in there. If I type “foo” into the “File name” field and press enter, in any other application it would change into the “foo” folder. Notepad++ however gives me a message box “Confirm Save as”, “foo already exists. Do you want to replace it?”.
If I type “foo” and press enter, it works like a charm.
Is this “normal”? If not, any idea how to fix it? Thanks!
Windows 7, Notepad++ v7.7 32-bit.
-
Doing some guesswork, could be wrong … but some basic GUI 101 …
Notepad++ uses standard “file saving” control provided by Windows.
The control should provide Notepad++ withpath
andfilename
, then Notepad++ will perform the actual file create and write by itself.The control has several sub controls, specifically ‘file list’ and ‘file name’ text box. ENTER keystroke will behave differently depending on which sub control has the focus.
It makes lots of sense that pressing ENTER when the text box has the focus will return immediately to Notepad++ with
path
=c:\xxx\xxx andfilename
=foo. Admittedly the control could be somewhat “cleverer” and test if the name matches a directory but this is not Notepad++ logic but rather the control’s. Your claim that “in any other application it would change into the foo folder” requires more proof.The message of “Confirm …” is issued by Notepad++ itself after the control already completed since Notepad++ detects that file (or dir) c:\xxx\xxx\foo exists.
If you type foo when the focus is on “file list” then the keystrokes will be used to find an object with matching prefix and the ENTER will be evaluated depending on the selected object type. For a DIRECTORY it will descend into it.
-
Thanks gstavi!
Regarding other applications, I quickly tested Visual Studio, Notepad (without ++!), MS Paint, and they all change into the directory instead of trying to write over it. I cannot even type “…” + Return to go to the parent directory.
Just wondering - do others have the same issue, or is that on my end only? Can you type “…<enter>” to go to the parent directory?
-
I use (older) Notepad++ on Linux on wine.
I see directory changed (which you want) as well.
Note that the file-save control on wine is somewhat different because it is actually provided by wine rather than by Microsoft.Does the file-save control look identical for Notepad++ and for Visual Studio? Perhaps there are several control variants floating around and Notepad++ uses an older one.
-
True, the “Save as” dialog looks different than in other applications. The left side has a few large icons of favorite locations (such as “Recent Places”, “Desktop”, “Libraries”, …), where other applications have a full file tree.
If anyone is running Notepad++ on Windows 7 and could comment here if they also have this behavior - thank you!
-
if I understood correctly, then changing to use new style dialog… under settings->preferences->default directory should do what you want.
-
@Ekopalypse Yes, that fixed it, thank you!
Switching to the “new” dialog solves that issue and seems to use the system-wide Save As… dialog.