TechBuzzPro

Recover Unsaved Notepad Files in Windows: Best Methods

· 7 min read · Windows & PC

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

You can recover an unsaved Notepad file if you are using the modern version of Notepad in Windows 11, which features an automatic session restore; however, for older versions of Windows or the legacy Notepad app, there is no built-in "AutoSave" or "Recover Unsaved Documents" button, meaning recovery relies on searching for temporary files or using system backups. The modern Notepad app automatically saves the state of your tabs, allowing you to reopen the app and find your text exactly where you left it, even after a restart. For those on older systems, the process involves digging into the AppData folders where Windows occasionally stores temporary cached versions of open files.

What You'll Need

  • A Windows PC running Windows 10 or Windows 11.
  • Administrative privileges to access certain system folders like AppData.
  • File Explorer access to search for temporary file extensions.
  • (Optional) A third-party file recovery tool if the file was previously saved but then deleted.

Step-by-Step

Depending on your version of Windows and whether the file was ever saved once, the recovery process differs. Note that menu labels and folder paths may vary slightly depending on your specific Windows build or region.

Method 1: Using the Windows 11 Session Restore

  1. Close any current instances of Notepad that are open.
  2. Click the Start button and type "Notepad" into the search bar.
  3. Launch the application.
  4. Check the tabs at the top of the window. In the updated version of Notepad, Windows automatically caches the content of unsaved tabs. Your missing text should appear in a tab labeled "Untitled" or with the content you previously typed.
  5. Immediately go to File > Save As to secure the data to a permanent location on your hard drive.

Method 2: Searching the AppData Temp Folder

If you are using an older version of Notepad or the session restore did not work, Windows may have stored a temporary copy of the file in the system's temporary directories.

  1. Press the Windows Key + R on your keyboard to open the Run dialog box.
  2. Type %AppData% into the text field and press Enter. This will open the Roaming folder of your user profile.
  3. In the address bar at the top, click on the folder name one level up (usually your username) to go back to the main User folder, then navigate to Local > Temp. Alternatively, you can type %localappdata%\Temp directly into the Run box.
  4. In the search bar at the top right of the File Explorer window, type *.txt to filter for all text files.
  5. Sort the results by "Date modified" in descending order so the most recent files appear at the top.
  6. Look for files with names that start with a tilde (~) or look like random strings of characters. These are often temporary versions of files created by the system.
  7. Right-click a promising file and select Open with > Notepad.
  8. If the content is there, save it immediately using File > Save As.

Method 3: Checking for Previous Versions (Shadow Copies)

This method only works if you had previously saved the file at least once and had System Protection or File History enabled.

  1. Navigate to the folder where the file was originally saved.
  2. Right-click the folder itself (not the file, as the file may be gone) and select Properties.
  3. Click on the Previous Versions tab.
  4. If Windows has created restore points, you will see a list of folder versions with dates and times.
  5. Select a version from a time when you know the file existed and click Open.
  6. Locate the file within that older version of the folder and copy it to your current desktop.

Method 4: Using Windows File Recovery (Official Microsoft Tool)

If the file was saved but then accidentally deleted, you can use the command-line tool provided by Microsoft.

  1. Open the Microsoft Store and search for "Windows File Recovery". Install and launch the app.
  2. You will be prompted to run the tool in a Command Prompt window.
  3. Use the following command structure: winfr source-drive: destination-drive: /regular. For example, if you are recovering from the C: drive to an external E: drive, type winfr C: E: /regular /n *.txt.
  4. The tool will scan the drive for deleted .txt files and move any found fragments to the destination drive.
  5. Browse the recovered folder on your destination drive to find your unsaved or deleted text.

Common Mistakes

  • Continuing to write new data: One of the biggest mistakes is continuing to use the computer heavily after realizing a file is lost. New data can overwrite the sectors of the hard drive where the temporary file or deleted file was stored, making recovery impossible.
  • Restarting the PC blindly: While some modern apps recover after a restart, older temporary files in the Temp folder are often cleared during a system reboot or by disk cleanup utilities.
  • Saving over the file: If you find a partial recovery, do not save it directly over the original file. Always use "Save As" to create a new copy to avoid corrupting the only remaining fragment of your data.
  • Using untrusted "Recovery" software: Many websites promote free recovery tools that are actually adware or malware. Stick to official Microsoft tools or well-known industry standards.

Tips

  • Switch to a robust editor: If you frequently lose work, consider using Notepad++, VS Code, or WordPad. These applications have significantly more advanced auto-save and backup features than the basic Windows Notepad.
  • Enable File History: Go to Settings > Update & Security > Backup and turn on "Automatically back up my files". This creates a continuous timeline of your documents.
  • Use Cloud Storage: Save your active text files in a folder synced with OneDrive, Dropbox, or Google Drive. These services maintain a "Version History" for every file, allowing you to revert to a version from minutes or hours ago.
  • The Ctrl+S Habit: Develop a muscle-memory habit of pressing Ctrl + S every few minutes. It is the only 100% guaranteed way to prevent data loss in simple text editors.

Troubleshooting

If the methods above did not yield your file, consider these possibilities:

The Temp folder is empty: This usually happens if you have run a system cleaner (like CCleaner) or if Windows Disk Cleanup was triggered. In this case, the temporary cache has been wiped, and software-based recovery is unlikely unless you use deep-sector scanning tools.

Files are found but contain gibberish: This occurs when the file is fragmented or the encoding has changed. Try opening the file in a more advanced editor like Notepad++ and changing the encoding (Encoding > UTF-8 or ANSI) to see if the text becomes readable.

Previous Versions tab is empty: This means System Protection was disabled for that drive. You cannot retroactively enable this to find old files; it must be turned on before the file is lost. Check if you have a cloud backup (OneDrive) that might have a copy.

Windows File Recovery finds nothing: If the "regular" mode fails, you can try the "extensive" mode by replacing /regular with /extensive in the command line. This performs a deeper scan of the disk, though it takes significantly longer.

Frequently Asked Questions

Does Notepad have an AutoSave feature?

The legacy version of Notepad does not. However, the updated Notepad app in Windows 11 includes a session state feature that remembers unsaved changes and restores them when the app is reopened.

Can I recover a file if I clicked "Don't Save"?

If you explicitly clicked "Don't Save" in the legacy version of Notepad, the application tells Windows to discard the buffer. Recovery is extremely difficult and unlikely unless a temporary system snapshot was taken at that exact moment.

Will a computer restart help recover my file?

In Windows 11, restarting and reopening Notepad may trigger the session restore. In Windows 10 or older, restarting is generally discouraged as it may clear the temporary files you are trying to find.

Where does Windows store temporary text files?

Most temporary files are stored in C:\Users\[Username]\AppData\Local\Temp. Some application-specific caches may reside in the Roaming folder under AppData.

Can I use Recuva or other tools for Notepad files?

Yes, third-party tools can scan for deleted .txt files on the hard drive. However, they can only recover files that were actually written to the disk, not text that existed only in the RAM (memory) and was never saved.