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

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.


30 Responses to “Notepad++ empties and saves file: how to recover”

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

  2. kais says:

    You just saved my life!
    I am so happy :))))))
    Thank youuuuuuuuuuuuuuuu

  3. Eddie Wolf says:

    Thanks Much Peter…first time this has happened…and last ;)

  4. 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 Thanks for the info on the backup location.

  5. Mango says:

    This reminds me of the backup software that Dilbert’s company wrote:

  6. bean says:

    hell yeah- Thank you!

  7. nno says:

    Thank you very much

  8. Christophe says:

    Thank you very much !

  9. Jenny says:

    Thank you SO much, I had a massive panic but now it’s okay!

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

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

  12. Juan says:

    You saved my fucking life.

    I love you!

  13. Dj says:

    I love you man. Ang google too

  14. 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++.

  15. Maaz says:

    Thanks Man …. its Perfect recovery.

  16. Anurag says:

    Thank you very much. It saved my days of work.

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

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

  19. Kruti says:

    I cannot find backup folder as specified in previous discussion.
    Is there any other way of restoring the file back?

  20. Lucy says:

    You just saved my life :3 I love you <3

  21. Ichan says:

    Thank you, very great solution!

  22. Prianggara says:

    Thanks man for useful CRAP

  23. 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)?

  24. :( says:

    :( I don’t see it ;(
    Tens of thousands of lines … This sucks.

  25. :D says:

    YAY!! I found it :D XD :D XD
    btw I kinda lied, it wasn’t "tens" or thousands, just thousands 1,990, almost 2,000! DAMN!!

  26. :) 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

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

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

  29. Gustavo says:

    Saved my life!!
    Thak you so much!!!!!!

  30. Arnav Simer says:

    Thanks alot man your post saved my life

Speak your mind

To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word