File Backup Failed
The following message pops up when saving a file --> The previous version of the file could not be saved into the backup directory at “.\junk.txt.2019-08-30_155609.bak”. Do you want to save the current file anyways? I’ve changed the Backup On Save save settings to Verbose with a Custom Backup Directory of “.” (just a period). Can someone make this work? Version v7.7.1 64-bit on Windows 10
Custom Backup Directory of “.” (just a period)
Unfortunately, in this dialog,
.doesn’t mean what you think it means. Based on my experiments, it means the current directory, as seen by the Notepad++ application… not the current file’s directory. (This will often be the executable directory, which you might not have write permssion, or wherever your shortcut’s “Start In” value points to.)
$(CURRENT_DIRECTORY)nomenclature, which grabs the directory of the current file, and works in the RUN menu and in NppExec does not work here.
If I try to set the custom backup directory to a folder without write permission, I get the same error you get.
If I try to do another relative custom directory, like
NppBackupHeyawith no absolute path before it, it tries to write to the
<Notepad++ current directory>\NppBackupHeya\, which is not what’s intended, either. (if that folder exists, it will write there; but it won’t create it, even if it has write permission to that directory. interesting)
If I try to set it to a full hardcoded path, it works just fine.
Maybe someone else knows a way to put that file in the current file’s directory, rather than either the
NppBackupsubfolder or a single hardcoded location.
or wherever your shortcut’s “Start In” value points to
Actually, I redid my experiment: my
start insetting points to a different directory than the executable’s directory, but it still does the relative backup save relative to the executable’s directory.
Ok, hopefully somebody knows or can fix it.