Does Notepad++ backup pre-edited files anywhere?

44

7

If I've accidentally modified a configuration file using Notepad++, saved it, and then closed the file - is there any possibility that Notepad++ may have saved the pre-modified content in a temporary file somewhere?

I need to recover the configuration file - any ideas how I can do this?

Stan

Posted 2011-05-10T21:59:28.130

Reputation: 6 535

Answers

48

Go to: Settings > Preferences > Backup.

Screenshot

pcunite

Posted 2011-05-10T21:59:28.130

Reputation: 1 126

1To clarify, "Backup on save" is what will copy the pre-modified version of your file to the Backup Directory whenever you save it. Simple backup will only keep one copy of your file as filename.ext.bak and as such identically named files from different locations will overwrite each other's backup. Verbose backup will append an ISO timestamp, e.g. test.txt.2017-07-17_162635.bak. Be careful with large files like CSVs as there's no way to limit the number of backups, prune existing backups, or disable it above a certain file size. – Lilienthal – 2017-07-17T08:31:37.833

22

Press start+R And Paste

%AppData%/Notepad++/backup

rename the the file you want to backup from this format "yourfile.php@2015-01-08_190914" to this format "yourfile.php" and take it to your work directory.

Mohammed

Posted 2011-05-10T21:59:28.130

Reputation: 221

1Or just paste the path into the windows explorer to get to the file. – Tara – 2016-08-10T18:02:17.947

9

If Notepad++ crashes, and no data remains then

Press Start+R Then Paste: %AppData%/Notepad++/backup

You will see all backed up files there.

CodeBlood

Posted 2011-05-10T21:59:28.130

Reputation: 101

this is what happened to me and I can find the backup file there. not sure why there is people down-voting it.. – Afriza N. Arief – 2015-11-16T06:04:47.407

4

From a discussion at Sourceforge:

Try finding the recovery folder of Notepad++. On my XP machine, it is at
C:\Documents and Settings\<user account name>\Local Settings\Temp\N++RECOV
The path may start differently in other versions of Windows.

stvls

Posted 2011-05-10T21:59:28.130

Reputation: 41

1

Might be possible with just Windows 7.

Right-click to the file you want to restore and select "Restore previous versions". Not sure about configuration files, but worked perfectly with html and css files (promised myself this will never happen again :)

PS. my original files were 3 days old and were saved as part of system restore point.

xsqo

Posted 2011-05-10T21:59:28.130

Reputation: 11

0

Go to the folder of the file, see if there is a subfolder called nppBackup. Recently I've found sometimes the backup wasn't created in %AppData%/Notepad++/backup but it always seems to get created here, with the following file name format [original file name][date stamp]_[time stamp].bak

clayRay

Posted 2011-05-10T21:59:28.130

Reputation: 101

0

No. There is no way to restore state of the closed file.

But pcunite pointed out a good way to go in Your future daily work with notepad++. Backup is as simple as selection of one option in the settings.

G. Demecki

Posted 2011-05-10T21:59:28.130

Reputation: 109