Notepad++ empties and saves file: how to recover
First published on August 28, 2014
I was using Notepad++ to edit a file in Windows 7 when the program suddenly emptied the file, saved the empty file, and crashed. Nevermind the fact that this was an alarming occurrence for a code editor, but I didn’t want to lose my work. I believe this was caused by its relatively new (in version 6.6.x) “session snapshot & periodic backup feature”, which I hope has since been patched. The problem has not happened since a couple of months ago, only happened once, and a few updates to 6.6.x have since been released. Although, since that occurrence I have been using Notepad++ less.
July 2015 update: this crash happened to me again in Notepad++ 6.7.9.2
The good news about the periodic backup feature erasing all my work is that it was also the one that restored my work. I was able to find the folder C:\Users\<my_username>\AppData\Roaming\Notepad++\backup, in which there was a copy of the file just before Notepad++ had emptied it.
If you’re looking for a different code editor for Windows, check out the more fully-featured but not as lightweight Sublime Text or Netbeans.
October 12th, 2014 at 10:13 pm
Sid says:
Awesome, thanks. You just saved me hours of work.
I just had the same thing happen to me on Notepad++ v6.6.9.
November 30th, 2014 at 11:14 am
kais says:
You just saved my life!
I am so happy :))))))
Thank youuuuuuuuuuuuuuuu
December 1st, 2014 at 5:38 am
Eddie Wolf says:
Thanks Much Peter…first time this has happened…and last
December 4th, 2014 at 6:47 am
Ben says:
I too encountered this problem with a couple of later versions of Notepad++ …v6.6.8 and .9, I think. I’m trying out the Atom editor over at atom.io. Thanks for the info on the backup location.
December 17th, 2014 at 9:59 am
Mango says:
This reminds me of the backup software that Dilbert’s company wrote: http://search.dilbert.com/search?w=quikprotect&x=0&y=0
January 6th, 2015 at 12:18 pm
bean says:
hell yeah- Thank you!
January 21st, 2015 at 1:09 pm
nno says:
Thank you very much
February 8th, 2015 at 10:58 pm
Christophe says:
Thank you very much !
February 16th, 2015 at 7:46 am
Jenny says:
Thank you SO much, I had a massive panic but now it’s okay!
February 21st, 2015 at 12:16 pm
Imran says:
In last 2 months, this is the 3rd time notepad++crashed. I have lost 3 to 4 days of PHP coding work on couple of occasions. However, this time Thanks to this article I saved my life a day.
A great thanks to the author. I just save the backup path of notepad++ to recover from future crash problems, if any.
May 1st, 2015 at 7:09 pm
Gaspar says:
I experienced notepad pus (npp++) crash while saving… having several modules loaded in different tabs… awfully, I had to close npp, knowing that ‘session’ manager will get my work from the either last saved or from backup area… well I did open again npp and my program said "It seems that was modified by another program… or so, do you want to reload…?" — my error I said "Yes", did not realized that the reload was the blanked-out one, and in that exercise I lost the one from the backup…!!!! hours/weeks of work gone!
geee…!!! terrible… I do not know how to recover my work…. any suggestion welcome.. thanks
May 12th, 2015 at 6:19 pm
Juan says:
You saved my fucking life.
I love you!
August 22nd, 2015 at 4:43 pm
Dj says:
I love you man. Ang google too
August 30th, 2015 at 8:16 am
Clyde says:
Hi Folks
I’ve searched high and low for an answer and this is the closest I have come to one. Thanks for this.
My particular problem is with find/replace in files within notepad++. I noticed a while back after crashing while finding in files, image, zip and other type files were corrupt. I’m trying to get to the bottom of the problem though I suspect notepad++ is the culprit.
These types of files exist inside the folder searched as they are part of the project. I have the files backed up in different locations, so all is not lost. But my confidence in notepad++ is touch and go to say the least at present.
I’d appreciate to know if anyone else has noticed any corruption similar to this while using notepad++.
November 21st, 2015 at 2:01 pm
Maaz says:
Thanks Man …. its Perfect recovery.
February 24th, 2016 at 1:39 am
Anurag says:
Thank you very much. It saved my days of work.
March 1st, 2016 at 11:48 pm
Bahi Sahab says:
Thank you very much i lost my work many time … but today i back my work when read your artical.
thank you .
March 24th, 2016 at 2:55 pm
ikomrad says:
How do you restored those files in the backup folder? I don’t see a restore option on any of the menus.
Reply from Peter: You have to manually copy and paste the backup file and then open it as if it were the normal file.
April 10th, 2016 at 5:48 am
Kruti says:
Hi,
I cannot find backup folder as specified in previous discussion.
Is there any other way of restoring the file back?
April 19th, 2016 at 10:53 am
Lucy says:
You just saved my life :3 I love you <3
May 13th, 2016 at 12:20 am
Ichan says:
Thank you, very great solution!
July 2nd, 2016 at 2:27 am
Prianggara says:
Thanks man for useful CRAP
August 23rd, 2016 at 6:16 pm
MJ8121 says:
Hello! Thanks for the info. Notepad++ (6.9.2) just crashed, emptied, and overwrote my whole main css file. Unfortunately, the file that I lost is not one of the ones listed in the backup folder. Any ideas on other places to looking for backups (or even fragments of backups)?
September 25th, 2016 at 9:22 pm
:( says:
I don’t see it ;(
Tens of thousands of lines … This sucks.
September 25th, 2016 at 9:29 pm
:D says:
YAY!! I found it XD XD
btw I kinda lied, it wasn’t "tens" or thousands, just thousands 1,990, almost 2,000! DAMN!!
September 25th, 2016 at 9:40 pm
:) says:
It’s me again for the third and last time. In case you are having any troubles like I was, just open up notepad++, click on <b>settings</b> then pick <b> Preferences … </b> from the the drop down menu, then click on <b>Backup</b> at the left side directory, then just copy and paste the path provided in the "Backup path" bar, into your computer, and TADAAAA open your lost file
September 28th, 2016 at 9:41 pm
Josh Davis says:
Similarly, when I make a new file, the first save works, but I can never save after that. I mean, I hit save, the tab is blue, but the file has no changes in content.
Only if I close the file, re-open it, and paste my text back in will it let me save it correctly. No errors, warnings, etc.
Happens on 3 systems, one was a clean re-install of Win 7. Has been an issue for the last few versions.
In general, I should be able to hit save, and even if nothing changed, it should write out the file again. No questions asked, unless it fails, in which case it should warn me.
I’m trying Sublime now. It is taking me a little getting used to, but if it writes out a file when I tell it to save, then I will be happy.
September 28th, 2016 at 10:30 pm
Newbie says:
Hey guys, I’m having a problem with my NP++ 6.9.2 ver.
I can’t find any notepad backup file on my computer. Is there any other way to restore the null crash file?
It’s been an hour(s) since I started my computer…
Need help Thanks :3
February 19th, 2018 at 12:04 pm
Gustavo says:
Saved my life!!
Thak you so much!!!!!!
July 26th, 2018 at 12:01 pm
Arnav Simer says:
Thanks alot man your post saved my life