====== What to Do if You Didn't Save Your Notepad Tabs Before Restarting (Windows) ====== Nowadays Windows has a "restore session" feature in Notepad that mostly works, but if you restart your computer it may or may not restore your files properly. In case that happens, here's a way you might be able to get those unsaved .txt files back. IMPORTANT NOTE: I am not a tech-guru and I didn't figure any of this out myself. I searched the web for help and this is what I learned from a Reddit thread. It worked, but it wasn't 100% clear if you're not a tech-guru so I decided to write it out clearly for folks who needed it. ===== 1. Check to see if the temp files are there ===== Windows saves the temp Notepad save state things to the following location: "C:\Users\[yourname]\AppData\Local\Packages\Microsoft.WindowsNotepad_8wekyb3d8bbwe\LocalState\TabState" Go there and see if there's files from recent dates. If so, yay! You can maybe get them back. ===== 2. Download Notepad-State-Library ===== This is a thing that can process the .bin files and (hopefully) turn them back into readable text. Download it here: https://github.com/ogmini/Notepad-State-Library I downloaded the regular standalone version. ===== 3. Run Notepad-State-Library ===== It'll generate some .csv files that look like this: {{:guides:screenshot_2025-03-19_110420.png?nolink|}} **NoFileTabs.csv** will have the unsaved Notepad tabs in there. Open it with something like [[https://www.libreoffice.org/|LibreOffice Calc]]. ===== 4. Find the decoded text ===== At first the spreadsheet looks crazy, but don't freak out! Scroll over until you find the column labeled "ContentString." {{:guides:screenshot_2025-03-19_110700.png?nolink|}} This'll have the decoded text in it! Then you can just copy-paste that into a new .txt file-- and save it properly. ===== 5. How to not have to do this again ===== Download a notepad program that does auto-saves, like [[https://notepad-plus-plus.org/|Notepad++]]. ===== Questions/Discussion ===== Leave a note at the [[https://pixietails.atabook.org/|guestbook]] or [[tozka@dreamwidth.org|email me]] (with the understanding that I'm not tech support and can't help beyond this document).