Where Notepad++ Stores Session and Backup Files — How to Recover

Category: Tips
Posted: 18.09.2021
Author: Antonio

Notepad++ is an excellent text editor — an advanced Notepad for programmers and anyone who works with text files a bit more than usual.

Notepad++ logo

If you haven’t tried Notepad++ yet, I recommend it!

Sometimes, after a hard reboot or after “cleaner” programs wipe temporary files, unsaved tabs in Notepad++ don’t come back — everything that wasn’t saved disappears.

I often keep temporary notes in Notepad++ and sort them into proper folders later, so until I save them, the information is at risk.

Recently it happened: Windows installed updates and rebooted without waiting, and Notepad++ opened clean and empty.

Luckily I have shadow copies :-), so recovery was easy.

Where Notepad++ keeps its session and backups

The session file session.xml (the list of open tabs) is in:

C:\Users\<user name>\AppData\Roaming\Notepad++

On old Windows versions it may be here:

C:\Documents and Settings\<user name>\Local Settings\Temp\N++RECOV

The backup copies of unsaved tabs are in:

C:\Users\<user name>\AppData\Roaming\Notepad++\backup

Quick way to open it: press Win+R and type %AppData%\Notepad++\backup.

How I restored everything

I took the previous version of the Notepad++ folder from a shadow copy (folder properties → Previous Versions) and replaced the current folder with it. I started the editor — and everything was back as it was the day before.

Tip: make sure Settings → Preferences → Backup → Enable session snapshot and periodic backup is on, and close Notepad++ before restoring files into its folder.

Share with friends or on social media (thanks!)
Related posts:

Написать

Копирование информации с сайта возможно только с указанием прямой ссылки - https://nemcd.com