Lost code lines when Notepad++ crashed

I was working on a .js file this morning on Notepad++, as usual, when the program just crashed. So I ended it, and re-opened it to see that all my code lines in my .js file, had disappeared, and now all I have left is the file with a size of 0kb because there's nothing left in it. How the hell is that even possible ? It erased everything I typed and saved the file as if there's nothing in it.

Do you know a way to get my code back ? Or did something like this ever happened to someone ? :/ I'm kinda worried because there was a lot of work there and I don't feel like re-typing it all...


When that option is enabled (and it is by default), Notepad++ keeps a backup copy of files you edit.

You can find the backups in the directory %APPDATA%\Notepad++\backup under the format filename@datetime.


I lost four unsaved files when my Notepad++ crashed, I searched through net and found another way to retrieve unsaved files other than backup folder

C:\Users\{username}\AppData\Roaming\Notepad++\backup

Hope it can help others who face the same problem as me. You can try to locate the dump files at

C:\Users\{username}\AppData\Local\Temp\N++RECOV

There will be .dump file inside, this is where I found my unsaved files. You can open the dump file with Notepad++, and see your unsaved works.


This has happened to me a few times lately and I've found a few solutions that make it possible to recover the lost code.

For Windows 7 and probably other modern Windows versions:

  • Find the file in File Explorer. The size will be 0KB. Right click on it and then choose Properties from the context menu.
  • Choose the Previous Versions tab. There's a good chance you will find a fairly recent version saved during the latest Restore point. If it's a bit old, it's still probably better than the current 0KB.
  • Click the Restore button.

My personal optimal solution:

Since this happened to me a few times and the Windows Previous Version was not always up to date, I looked for a different solution that could always give me the latest, most up-to-date version before the 0KB crash.

I discovered that I already had the solution installed on my computer. I have a SugarSync account that always backs up my work files to the cloud. The great part of the service is that SugarSync always keeps the last 5 versions in the cloud, so while the current version will be 0KB, you can download the next to last version and update your file on your computer.

If you have some other backup program, you can check if that service also keeps different versions that you can recover.


I've used notepad++ without any backup for years. One day this happen to me, too.

Here is what I've found as possible solutions:

http://buffernow.com/notepad-plus-crash-recover-your-lost-file/ (similar to Indrajit answer) - not much help. I didn't find my file there.

I have recovered my file one week ago as per answer of Hvck

Same problem here. Same answers: https://superuser.com/questions/390204/how-to-restore-a-previous-version-of-file-in-notepad

One lesson learned: Use the backup!

  1. use a plugin: http://www.ilovefreesoftware.com/12/windows/two-plugins-auto-save-files-notepad-auto-save-autosave2.html

  2. use notepad++ backup http://allinworld99.blogspot.ca/2015/01/notepad-backup-files.html

notepad++ backup

** UPDATE **

It happened to me again!!! Another way to recover my file: View source on my browser and resave the file to other location. If you are lucky enough to have the file loaded in your browser :) It worked for me for a css file and for a js file.

Comparing the files: what N++ backed-up and the file from browser and files are matching. OMG!