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
-
@paulteigeler said:
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.)-
the
$(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. -
-
@PeterJones said:
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.
-
…or can fix it
I think it falls in the feature request arena; it’s not something that is technically broken.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login