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

  • Was this ever resolved? I have the same issue.

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

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

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

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

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

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

    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++)

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

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

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

Log in to reply