Community
    • Login

    Default Save location

    Scheduled Pinned Locked Moved General Discussion
    13 Posts 4 Posters 23.4k 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.
    • mere-humanM
      mere-human
      last edited by

      There was a bug when the Default Directory setting wasn’t remembered:
      https://github.com/notepad-plus-plus/notepad-plus-plus/issues/9767
      It has been fixed in v8.

      1 Reply Last reply Reply Quote 3
      • Wim GielisW
        Wim Gielis
        last edited by

        Thank you mere-human, I have exactly the same as in the post you linked to. Many thanks and I guess this topic can be closed.

        1 Reply Last reply Reply Quote 0
        • Wim GielisW
          Wim Gielis
          last edited by

          Well, too quick I think.
          I upgraded to version 8 64 bits. I create a new file, typ 1 letter, hit Ctrl-s and it defaults to the Notepad++ location. Notepad++ was already closed and restarted and the path in the settings is correct: %userprofile%\Desktop

          Alan KilbornA 1 Reply Last reply Reply Quote 0
          • Alan KilbornA
            Alan Kilborn @Wim Gielis
            last edited by

            @Wim-Gielis said in Default Save location:

            I upgraded to version 8 64 bits. I create a new file, typ 1 letter, hit Ctrl-s and it defaults to the Notepad++ location. Notepad++ was already closed and restarted and the path in the settings is correct: %userprofile%\Desktop

            Works for me.
            Is it time for you to post your Debug Info (from the ? menu)?
            (As I see now, previously requested by Peter)

            1 Reply Last reply Reply Quote 0
            • Wim GielisW
              Wim Gielis
              last edited by

              Apologies, I must have missed that request.

              Notepad++ v8 (64-bit)
              Build time : Jun 6 2021 - 18:38:25
              Path : C:\Program Files\Notepad++\notepad++.exe
              Command Line :
              Admin mode : OFF
              Local Conf mode : OFF
              Cloud Config : OFF
              OS Name : Windows 10 Enterprise (64-bit)
              OS Version : 1909
              OS Build : 18363.1082
              Current ANSI codepage : 1252
              Plugins : ComparePlugin.dll HTMLTag.dll mimeTools.dll NppConverter.dll NppExec.dll NppExport.dll NPPJSONViewer.dll NppSaveAsAdmin.dll PythonScript.dll qkNppReverseLines.dll QuickText.dll Remove Duplicate Lines.dll XMLTools.dll

              PeterJonesP 1 Reply Last reply Reply Quote 0
              • PeterJonesP
                PeterJones @Wim Gielis
                last edited by

                @Wim-Gielis ,

                Maybe try running Notepad++ with the -noPlugin command-line-argument – it’s doubtful, but maybe one of your plugins is messing up that feature.

                If you go to Settings > Preferences > Default Directory, if you click on the ... button, it should pop up your %userprofile%\Desktop directory; if you hit Save, it should come back and the path in that entry should now have expanded to your actual userprofile directory (something like my example c:\Users\Peter\Desktop shown in my screenshot above).

                If it didn’t, that might mean that for some reason, Notepad++ cannot convert your %userprofile%\Desktop to an actual directory name (maybe there is some strange character, or it’s not properly defined?).

                OTOH, if it does convert after the ... and save, does the feature of using that as default directory for saving and opening work on this instance? What about if you exit and re-start? If it works with the explicit directory name, then it would strengthen the argument that something in your value of %userprofile% is confusing Notepad++. (But I will reiterate that my %userprofile% variable works just fine.)

                Because whatever I try, if I have the entry set to a literal directory or a %variable%-including name, it will always use that directory as the default for open/save-as when I have that option enabled.

                And today, instead of v7.9.5, I am using v8. So multiple versions, I still cannot replicate your results.

                Notepad++ v8   (64-bit)
                Build time : Jun  6 2021 - 18:38:25
                Path : C:\usr\local\apps\npp\npp.8.0.portable.x64\notepad++.exe
                Command Line : 
                Admin mode : OFF
                Local Conf mode : ON
                Cloud Config : OFF
                OS Name : Windows 10 Enterprise (64-bit) 
                OS Version : 1903
                OS Build : 18362.1256
                Current ANSI codepage : 1252
                Plugins : mimeTools.dll NppConverter.dll NppExport.dll 
                
                1 Reply Last reply Reply Quote 1
                • Wim GielisW
                  Wim Gielis
                  last edited by

                  Hi Peter,

                  -noPlugin does not help, same results. I see no plugins indeed, confirming that the no-Plugin command worked.

                  Clicking on the ellipsis, the D: drive comes up. In the box I have %userprofile%\Desktop, still D: shows up.

                  If I ctrl-o in Notepad++ and paste %userprofile%\Desktop, it goes to to the desktop. It could indicate that Notepad++ finds no issues with translating the %path% path to a literal path.

                  “f you hit Save, it should come back and the path in that entry should now have expanded to your actual userprofile directory (something like my example c:\Users\Peter\Desktop shown in my screenshot above).”
                  ==> it translated to: D:\OneDrive\OneDrive - Aexis NV\Bureaublad (Bueaublad is Dutch for desktop)

                  After that, hitting Save brings me to the Desktop, which is good ! Also after restart. The icing on the cake would be to be able to use %userprofile%\Desktop, such that if I copy my config.xml file to a remote computer, it would also default to the desktop there :-)

                  Could OneDrive be causing an issue ?

                  PeterJonesP 1 Reply Last reply Reply Quote 0
                  • PeterJonesP
                    PeterJones @Wim Gielis
                    last edited by

                    @Wim-Gielis said in Default Save location:

                    Could OneDrive be causing an issue ?

                    If OneDrive were intermittently not letting Notepad++ see that directory, then Notepad++ might just ignore that setting…

                    I have OneDriveForBusiness at work; when I set %SpacedVariable% to my one-drive folder, then set <GUIConfig name="openSaveDir" value="2" defaultDirPath="%SpacedFolder%" />, then started Notepad++ v8.0-64bit, it works as expected, with Notepad++ defaulting to my OneDriveForBusiness folder (which, like you, has spaces and hyphens in it) for both SaveAs and Open operations.

                    I don’t know why your instance is having trouble interpreting the %userprofile% variable correctly.

                    The icing on the cake would be to be able to use %userprofile%\Desktop, such that if I copy my config.xml file to a remote computer, it would also default to the desktop there

                    Unfortunately, I am not sure that you are going to be able to ice that cake, due to your current setup having strange difficulties with that variable.

                    1 Reply Last reply Reply Quote 1
                    • Wim GielisW
                      Wim Gielis
                      last edited by

                      Indeed, a strange behavior but thanks for the confirmation anyway.

                      1 Reply Last reply Reply Quote 0
                      • mere-humanM
                        mere-human
                        last edited by

                        Works for me in Notepad++ v8.
                        My guess is that %userprofile% is invalid at some point.
                        @Wim-Gielis Did you try absolute path?

                        Also, what of your configs are stored in OneDrive folder? This one or something different?
                        5790e5b1-7d23-401f-a837-19845922afae-image.png

                        Maybe at some point, the folder is locked because of the OneDrive sync which could be the problem.

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