Community
    • Login

    Can't change backup path under Settings->Preferences->Backup->Session snapshot and periodic backup

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    19 Posts 13 Posters 32.0k 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.
    • rinaldi6109R
      rinaldi6109
      last edited by

      Notepad++ 6.9.2

      Can’t change backup path under Settings->Preferences->Backup->Session snapshot and periodic backup.

      How to do?

      rinaldi6109R 1 Reply Last reply Reply Quote 0
      • rinaldi6109R
        rinaldi6109 @rinaldi6109
        last edited by

        @rinaldi6109 6.7.9.2

        1 Reply Last reply Reply Quote 0
        • jonandrJ
          jonandr
          last edited by

          Silly question: is “Enable session snapshot” checked?

          1 Reply Last reply Reply Quote 0
          • rinaldi6109R
            rinaldi6109
            last edited by

            Surely yes.

            1 Reply Last reply Reply Quote 0
            • rinaldi6109R
              rinaldi6109
              last edited by

              up…

              1 Reply Last reply Reply Quote 0
              • So_about_thatS
                So_about_that
                last edited by

                Was this ever resolved? I have the same issue.

                1 Reply Last reply Reply Quote 0
                • So_about_thatS
                  So_about_that
                  last edited by

                  After fooling around for too long, I downloaded the source code and believe I see it is hardcoded, so not possible to change, although the dialogue in the Settings screen gives the appearance that it is supposed to be able to be set by the user.

                  In \PowerEditor\src\WinControls\Preference\preferenceDlg.cpp

                  lines 2205 and 2206:

                  generic_string backupFilePath = NppParameters::getInstance()->getUserPath();
                  backupFilePath += TEXT("\\backup\\");

                  I think it is hardcoded in Parameters.cpp for userPath to be _nppPath, and the backup path is built by the above noted appending of the hardcoded “\backup\” to that, which will get you, in every instance, a backup directory as a subdirectory of the program directory. I tested this by putting the program into different directories on different drives and they all had that result. Wherever the notepad++.exe file lives, the backup directory is a sub.

                  Oh well.

                  1 Reply Last reply Reply Quote 0
                  • Kenneth RuppelK
                    Kenneth Ruppel
                    last edited by

                    Is everyone absolutely sure that there is no workaround for this? See, I keep some log files in Notepad++, because I need to keep track of system changes, etc. Since Notepad++ is automatically putting these files on C:\myusername…, when I have to do a system restore (which is always when something has gone wrong and the log is critical to keep), I am losing any recorded changes back to the last checkpoint. When I open Notepad++, I get told that the file has been changed since the last open, but the backup automatically puts me back in time, which is useless to me.
                    I hate to think I have to use WordPerfect (yes, I hate Word!) to keep the numerous log files I keep, because WP at least allows me to specify backup instructions.
                    The only other thing I can think of is to install Notepad++ from the source code after hardcoding the directory I want, but frankly, I don’t know how to do this.

                    1 Reply Last reply Reply Quote 0
                    • Timo PT
                      Timo P
                      last edited by

                      Seems that this is still hardcoded into program

                      That’s bad, since this backup-system fills up users roaming profile really fast if (s)he uses npp for more than just a few files. I had to turn that off for my copy for just that reason.

                      Timo PT 1 Reply Last reply Reply Quote 0
                      • Jim DaileyJ
                        Jim Dailey
                        last edited by

                        Note that, the file backup feature of the NPP Backup dialog does allow you to save backup versions of individual files in a location that you specify. Just check the Custom Backup Directory box and enter a directory path in the Directory: box.

                        If you set that up, then you should be able to get back to your files minus the very last edit you made before saving. If you could write a macro to, say, insert and then delete a space, then save for every open file, then you’d have the latest versions of those files in the backup directory.

                        Not sure if this will help you or not, but you might want to try out the Session Manager plugin. It lets you save multiple sessions (groups of files) by name in the NPP install directory’s plugins\Config\SessionMgr\sessions directory. If you use the plugin, then uncheck the Remember current session for next launch checkbox in the NPP Backup dialog. This only saves the names of the files in each session, not the files themselves.

                        1 Reply Last reply Reply Quote 0
                        • Timo PT
                          Timo P @Timo P
                          last edited by

                          @Timo-P said:

                          Seems that this is still hardcoded into program

                          That’s bad, since this backup-system fills up users roaming profile really fast if (s)he uses npp for more than just a few files. I had to turn that off for my copy for just that reason.

                          That is if the “user directory” is under the profile.

                          If it is in %programfiles%\npp etc. subdirectory and user doesn’t have write permission there then that’s again a problem. This makes this backup-feature useless for any large organization where users are not admins to their workstations.

                          1 Reply Last reply Reply Quote 0
                          • Henk BakkerH
                            Henk Bakker
                            last edited by

                            I just made a softlink from the backup dir to another drive in my computer. Since i’m working with confidential information I needed to get the temporary backup to an encrypted drive.

                            The method I used was based on this website: http://www.howtogeek.com/howto/16226/complete-guide-to-symbolic-links-symlinks-on-windows-or-linux/

                            in short: make a directory called backup where you want your backups of notepad to be stored. Than copy the files that are in there over to this directory. Delete the original backup directory from the path in notepad++. Then use the Link Shell Extension to make a softlink from the new location to the old location (which is in the settings of notepad++)

                            1 Reply Last reply Reply Quote 1
                            • Diego SayronD
                              Diego Sayron
                              last edited by Diego Sayron

                              Hi all!

                              To manage this question, just go to settings - preferences - CLOUD
                              Then, paste/type the desired path on: “Set your cloud location path here” textbox.

                              It will miraculously and automatically fill out “backup location” disabled box from Session snapshot and periodic backup frame.

                              Randy SpiesR 1 Reply Last reply Reply Quote 1
                              • Paul DeanP
                                Paul Dean
                                last edited by

                                Thank you! That fixed my issue. NPP backups from different computers are now saved to my encrypted cloud storage.

                                1 Reply Last reply Reply Quote 0
                                • David ZacharczykD
                                  David Zacharczyk
                                  last edited by

                                  @Henk-Bakker Thank you!
                                  I was able to work around the application limitation by using your suggestion. I used a symlink to re-direct backup notes to a dropbox folder. Now I can view notes on my laptop that I took on my desktop and didn’t get a chance to save.

                                  1 Reply Last reply Reply Quote 0
                                  • Randy SpiesR
                                    Randy Spies @Diego Sayron
                                    last edited by

                                    @diego-sayron
                                    Perfect, if non-intuitive solution. You may want to copy your existing backup files from ‘%userprofile%\Appdata\Roaming\Notepad++\backup’ to the new location.

                                    1 Reply Last reply Reply Quote 0
                                    • kitchin15K
                                      kitchin15
                                      last edited by

                                      The CLOUD solution is great!

                                      Important note, when the specified cloud location is unavailable, this happens:

                                      • Settings for Cloud and Backup revert to default.

                                      Then when the location is available again:

                                      • Settings for Cloud and Backup return to the custom values.

                                      So a full solution may involve a cleanup routine or script.

                                      kitchin15K 1 Reply Last reply Reply Quote 0
                                      • kitchin15K
                                        kitchin15 @kitchin15
                                        last edited by

                                        @kitchin15
                                        These changes are only take place after restarting NPP. In other words, if NPP is open when the location becomes unavailable, NPP silently fails to make the periodic backups. Other scenarios are similar, unless NPP is restarted.

                                        1 Reply Last reply Reply Quote 0
                                        • Andrey DenisenkoA
                                          Andrey Denisenko
                                          last edited by

                                          Hi There!
                                          I’m from the year 2025.
                                          And this insanely annoying issue is still here!

                                          Good job team!

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