Notepad++ is cleared after exiting abnormally.
-
Notepad++ is cleared after exiting abnormally. No backup files were found in the local backup directory. How can I retrieve the data that has been emptied?
-
@LhxVinCent
You haven’t given much information. Firstly how about providing the version of your Notepad++ installation. Run “Debug Info” from the?
menu. Copy and paste information that here.Have you read the FAQ post here. This gives some background of the backup process.
If indeed you have already checked the backup directory you may be out of luck, but read that FAQ first.
Terry
-
@Terry-R
The debug info is as follows:Notepad++ v8.1.4 (32-bit)
Build time : Aug 21 2021 - 12:58:42
Path : C:\software\Notepad++\notepad++.exe
Command Line :
Admin mode : OFF
Local Conf mode : OFF
Cloud Config : OFF
OS Name : Windows 10 Enterprise (64-bit)
OS Version : 2009
OS Build : 19045.5011
Current ANSI codepage : 936
Plugins : ComparePlugin.dll mimeTools.dll NppConverter.dll NppExport.dllI usually use Notepad++ to record important things at work, but today I suddenly don’t know what to do, and the program is directly stuck, and I have no choice but to end the process directly.
As a result, after reopening it, the tragedy was that the document that usually kept important records was emptied.I’ve been saving with Ctrl + S all the time during the editing process. -
@LhxVinCent
Thanks for the debug info.I have some concerns. Firstly 8.1.4 is a very old version, as you can see it states August 2021. Secondly the location of installation is C:\software. That’s an unusual location which begs the question. Where did you obtain the download from, was it an official version from the Notepad++ website or possibly provided by some third party website?
Also, you say you were saving often, but don’t mention where the location of that file was being saved to. I’m hoping you weren’t selecting the very same backup folder you mentioned in the previous post as that was for the backup process. Your actual save of the file was the right approach.
I’m hoping the details in that FAQ post might give you some direction and that you might eventually find the file. As you say it’s critical data and noone likes to lose valuable info.
By all means if you have more info available, especially the answers to my questions, post again.
Otherwise I have no major revelation that will help find your data.
Terry
PS, I upvoted you so your posts don’t need to be released by a moderator.
-
Depending on your luck meaning you have System Restore Enabled for the C: drive and the document in question is also on the C: drive and if not, System Restore would have needed to be enabled on the drive the document was on, you may be able to find copies of the backup document, it may not be the most current version due to Windows Shadow Copy Service using one of the many tools below as I had lost my Notepad++ sessions file a few times before when it got erased either by the new updated version of Notepad++ after the installation process.
- ShadowCopyView from https://www.nirsoft.net/utils/shadow_copy_view.html
- ShadowExplorer from https://www.shadowexplorer.com/
Please note that each top directory is a different backup date so you will find the same filename in the other backup dates.
The other thing is keep in mind that there will only be so many backups available so when a new one is made, the oldest one will be deleteted. Not sure exactly what the number of backups is by default.If that does not work, then you might have to use Data Recovery software which again would depend on your luck and it may not be the latest version of the document.
-
@LhxVinCent said in Notepad++ is cleared after exiting abnormally.:
No backup files were found in the local backup directory.
Can you paste a screenshot of your Settings > Preferences > Backup page?
Because I am not sure exactly what you mean by “local backup directory”. The possibilities that I can think of:
- If you mean the one in
%AppData%\Notepad++\backup\
, that only holds the session-snapshot-and-periodic-backup saves (which are the temporary copies that happen every 7 seconds [by default] when you are betweenCtrl+S
/File>Save; but as soon as you do a real save, that snapshot is deleted until you have more unsaved changes) - If you have the Backup On Save preference set to
Simple
orVerbose
:- and have defined the Custom Backup Directory, then every time you use
Ctrl+S
/File>Save, it should save a backup to that custom directory. If that’s not happening, that’s a problem (which is why I want to see your Backup preferences screenshot) - or instead have not enabled Custom Backup Directory, then the simple backup-on-save will be in the same directory as your file, or the verbose backup-on-save will be in the
.\nppBackup\
subdirectory relative to your active file’s directory. And again, it should update or save a new copy every time you hitCtrl+S
or File>Save if this is your option setup.
- and have defined the Custom Backup Directory, then every time you use
For better understanding Notepad++'s various backup features in the future, you will want to read the User Manual section on the Backup Preferences (https://npp-user-manual.org/docs/preferences/#backup) as well as this Forum’s Backup FAQ
the tragedy was that the document that usually kept important records was emptied.I’ve been saving with Ctrl + S all the time during the editing process.
I was originally thinking you were just relying on “session snapshot and periodic backup”, but if you’ve been actively saving using
Ctrl+S
, that is reasonable behavior on your part.As @Terry-R mentioned, v8.1.4 is pretty old at this point. Really old versions of Notepad++ used to have a bug where under certain unique Windows OS shutdown/crash conditions, a file being edited by Notepad++ would be saved as all NULL characters – you didn’t mention NULL, but maybe that’s what you are seeing. Over the last few years, Notepad++ has been drastically improved in that regard, but having a copy that’s 3.5 years old, that might be what has happened to you.
Using the techniques that @Almighty1 mentioned, or other file recovery software (the FAQ mentions a potential, though we cannot guarantee or warranty it), might help you recover your original files.
For the sake of your data going forward, I would highly recommend updating to v8.7.5 to get the last few years of bug fixes and improvements; and highly recommend reading and understanding the User Manual section and FAQ entry that I linked to earlier in this reply.
- If you mean the one in