9

Since Windows 11 (or maybe earlier) Windows Notepad internally stores unsaved files so if the application (or Windows) crashes they will be still there later. For example, Notepad++ stores those temp files in:

C:\Users\USERNAME\AppData\Roaming\Notepad++\backup

I've searched here (and searching online about this pointed me here too) :

C:\Users\USERNAME\AppData\Roaming
C:\Users\USERNAME\AppData\Local

But it seems they are not there (I even grepped all .txt files in those directories recursively)

2
  • 1
    If I were to hazard a guess, despite it being bad practice, it probably is within the installation directory within WindowsApps which is a protected folder. Commented Sep 19, 2024 at 7:58
  • 1
    My guess would be \AppData\Local\Temp, but keep in mind they may not be .txt files. Word for instance when doing autosaves generates .tmp files, so if notepad is using a similar mechanism then it may also be using a similar naming scheme. Commented Sep 19, 2024 at 11:26

3 Answers 3

11

Found it in:

C:\Users\USERNAME\AppData\Local\Packages\Microsoft.WindowsNotepad_8wekyb3d8bbwe\LocalState

Not sure what is the encoding, at least Notepad++ couldn't identify it, but the text is there

4
  • If you can not decode it, how you know it's the text? Commented Sep 20, 2024 at 9:27
  • 1
    there is a character every 2 bytes (l.i.k.e.t.h.i.s), but it's not UTF16 Commented Sep 20, 2024 at 9:29
  • 1
    Yes, this seems to be correct, found: "it will be stored in a .bin file at in C:\Users\<YourUsername>\AppData\Local\Packages\Microsoft.Windows.Notepad_8wekyb3d8bbwe\LocalState\TabState and/or C:\Users\Gebruiker\AppData\Local\Packages\Microsoft.WindowsNotepad_8wekyb3d8bbwe\LocalState\WindowState" Commented Sep 20, 2024 at 12:23
  • 1
    This was also helpful for me since I was migrating between PCs and I just copied the contents of both folders to be right where I left off. Commented Nov 20, 2024 at 15:42
1

The temp Notepad files are stored as bin files in HEX. You can view them in any text editor that supports/recognizes HEX-format. To convert the file to plain text visit: https://www.geeksforgeeks.org/dsa/convert-hexadecimal-value-string-ascii-value-string/

-1

Try : %USERPROFILE%\AppData\Roaming\Notepad++\backup

or C:\Users<YourUsername>\AppData\Roaming\Notepad++\backup

1
  • 1
    OP is asking about Notepad, not Notepad++. Commented Sep 11 at 22:26

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.