Losing unsaved text in Windows Notepad - one of the most annoying situations for users. if you accidentally closed the window, pressed Ctrl+W instead of Ctrl+S, or the program freezes - the result is the same: hours of work evaporated in an instant. Fortunately, even in standard Notepad.exe There are hidden recovery mechanisms, and in modern versions of Windows there are additional tools.
In this article we will look at 5 proven methodsHow to get back deleted text, including little-known auto-recovery features, analyzing temporary files, and using third-party utilities like Recuva or Disk Drill. We will pay special attention a unique feature of Notepad in Windows 11 - automatic backup via OneDrive, which only a few people know about. You will also learn why the classic advice “check the trash” is useless here and what to do if the file has been deleted from Shift+Delete.
1. Recovery via autosave in Windows 10/11
Starting from Windows 10 version 1809, a function has been added to Notepad automatic recovery after failures. It works differently than in Word or Excel: The file is not saved in the background, but the system records the changes in RAM. If the program closes abnormally (for example, due to a BSOD or PC shutdown), the next time you launch Notepad the following window will appear:
⚠️ Attention: The function works ONLY when incorrect closing (failure, crash, power outage). If you closed Notepad manually using a cross or Alt+F4 - this method will not help.
How to check for an autosaved version:
- 🔄 Launch Notepad (
Win + R→ enternotepad→Enter). - 📄 If the “Recover unsaved data?” window appears, click "Yes".
- 💾 Save the file immediately to a safe place (
Ctrl+S).
If the window does not appear, try force a crash:
- Open Notepad and enter any text.
- Run Task Manager (
Ctrl+Shift+Esc). - Find the process
notepad.exeand complete it via “Cancel task”. - Restart Notepad - sometimes this causes the recovery window to appear.
- Never
- 1-2 times a year
- More than 5 times a year
- Constantly
2. Search for temporary Notepad files in system folders
Notepad does not create temporary files in the traditional sense (like Word with extension .tmp), but Windows can save copies to folder AppData. The path depends on the OS version:
| Windows version | Path to temporary files | Expansion |
|---|---|---|
| Windows 10/11 | %LocalAppData%\Microsoft\Windows\INetCache\Content.Word\ |
.dat, .txt |
| Windows 7/8 | %LocalAppData%\Microsoft\Windows\History\ |
.tmp |
| Any version | %Temp%\ |
.log, .txt |
How to search:
- 🔍 Open
Explorerand paste the path from the table into the address bar (for example,%LocalAppData%\Microsoft\Windows\INetCache\). - 📅 Sort files by date modified ("Date" → "Descending").
- 📋 View files with the extension
.dator without extension - these may include copies of your text.
⚠️ Attention: Notepad temporary files are often don't have a readable name. Use Notepad++ or VS Code to view binary files - sometimes the text is hidden among service characters.
If temporary files won't open, try renaming them to .txt or use the utility Strings from the package Sysinternals to extract text from binaries.
3. Restore via Windows Change Log (VSS)
Volume Shadow Copy (VSS) is a Windows technology that automatically creates snapshots of files. It works even if you haven't manually enabled it, but it requires that you have it enabled on your disk. system protection.
How to check and restore:
- Open
Propertiesfolder where the file was located (right click → “Properties” → “Previous Versions”). - Select the latest available version of the folder by date.
- Click "Restore" or "Open"to view the content.
If the Previous Versions button is missing:
- 🛠️ Make sure system protection is enabled:
Control Panel → System → System Protection. - 💽 Check that there is enough disk space (VSS requires a minimum 10% free space).
- 🔧 If VSS is disabled, try enabling it via the command line:
vssadmin resize shadowstorage /on=C: /for=C: /maxsize=10%(replace
C:to your disk).
What if VSS doesn't find previous versions?
If the snapshots are missing, try alternative utilities for working with VSS:
1. ShadowExplorer (allows you to view shadow copies in a GUI).
2. VShadow from Microsoft (console utility for manually creating snapshots).
3. Check if the VSS service is disabled in services.msc (should be in the "Running" state).
4. Using third-party recovery utilities
If system methods do not work, specialized programs will come to the rescue. They scan the disk at the sector level and can find fragments of deleted files, even if they were erased from Shift+Delete.
Top 3 utilities for recovering text from Notepad:
| Program | Free version | Features |
|---|---|---|
| Recuva | Yes (with restrictions) | Scans file signatures, supports .txt |
| Disk Drill | Yes (up to 500 MB) | Deep scanning, fragment recovery |
| R-Studio | No (demo mode) | Professional tool for damaged disks |
Step-by-step instructions for Recuva:
Disable the drive (do not save new files)
Launch Recuva in mode "Deep Analysis"
Select file type Documents → TXT
Specify the folder where the original file was located (or the entire disk)
Save the recovered files to another disk-->
⚠️ Attention: Never save recovered files to the same disk from which you are scanning! It may re-record remaining pieces of data.
5. Hidden Notepad feature in Windows 11: Backup via OneDrive
B Windows 11 Notepad has received integration with OneDrive, which few people know about. If you are signed in with a Microsoft account and have synchronization turned on OneDrive, the program automatically creates backup copies of unsaved files in the cloud.
How to restore:
- Open OneDrive in the browser (onedrive.live.com).
- Go to section "Basket" (in the side menu).
- Find files named
Notepad_Autosave_*.txt(they may be hidden - turn on display of deleted files). - Restore the file to its original folder or download it.
If the file is not in the trash:
- 🔄 Check the folder
OneDrive → Documents → Notepad Backups(hidden folder, may not be displayed in the web version). - 📅 Use version log OneDrive: right click on the file → "Version".
OneDrive integration in Windows 11 is the only way to recover text if you close Notepad manually (no crash). This method does not work on older versions of Windows.
6. Alternative methods: from cache to RAM analysis
If none of the above helps, there are exotic, but sometimes working methods:
A. Cache Retrieval Clipboard (clipboard)
If you copied text fragments to the clipboard (Ctrl+C), you can try to restore them through:
- 📋 Utility ClipDiary (keeps clipboard history).
- 🔍 Folder
%LocalAppData%\Microsoft\Clipboard\(in Windows 10/11).
B. Memory dump analysis (.dmp)
If Notepad is closed abnormally, Windows may create a memory dump. To analyze it:
- Open
Event Viewer(Win + X → Event Viewer). - Go to
Windows Logs → Application. - Find errors with source
Application Errorand namenotepad.exe. - Download BlueScreenView or WinDbg for dump analysis.
B. Verification Swap file (swap file)
In rare cases, fragments of text remain in pagefile.sys. To extract:
- 🛠️ Disable the swap file:
Control Panel → System → Advanced Settings → Performance → Settings → Advanced → Virtual Memory → No Page File. - 🔍 Use FTK Imager or Autopsy for scanning
pagefile.sys(requires administrator rights).
FAQ: Frequently asked questions about text recovery in Notepad
Is it possible to get the text back if I close Notepad and restart the PC?
Yes, but the chances depend on the method:
- 🔄 Auto recovery (section 1) will not work - it only works on failure.
- 💾 VSS (section 3) or OneDrive (section 5) - the best options.
- 🛠️ Third party utilities (section 4) will help if the text has not been overwritten by new data.
Main rule: The fewer actions you took after losing the text, the higher the chances of recovery.
Why in the folder %Temp% no temporary Notepad files?
Notepad does not create temporary files in the classical sense. Instead:
- B Windows 10/11 data can be stored in
INetCache(section 2). - B Windows 7 temporary files sometimes appear in
%LocalAppData%\Microsoft\Windows\History\, but without guarantees. - If you used Third Party Notepad (For example, Notepad++ or Metapad), check their autosave settings.
What to do if the recovered file opens in hieroglyphs?
This means that the file was damaged or saved in the wrong encoding. Solutions:
- Open the file in Notepad++ and select encoding
UTF-8 without BOMorANSI. - Use HxD or other hex editorto manually find readable passages.
- Try converting the file via iconv (Linux utility, available in WSL or Git Bash):
iconv -f UTF-16 -t UTF-8 damaged_file.txt > recovered_file.txt
Is it possible to recover text if I formatted the disk?
Yes, but it is a difficult task that requires professional tools. Your actions:
- 🛑 Stop using the drive immediately - every new action reduces the chances.
- 💽 Connect the drive to another PC like external storage.
- 🔍 Use R-Studio or GetDataBack for deep scan (mode
Raw Search). - 📞 Contact a data recovery laboratory if the text is critical (for example, ACE Data Recovery or Kroll Ontrack).
Important: Do not install recovery programs on the same disk that you formatted!
How can I avoid losing text in the future?
Prevention is always better than cure. Set up:
- 🔄 Autosave in alternative editors (Notepad++, Sublime Text).
- ☁️ Cloud synchronization through OneDrive, Google Drive or Dropbox.
- 📝 Hotkeys: train yourself to press
Ctrl+Severy 5–10 minutes. - 🛡️ Backup folders with documents through Macrium Reflect or built-in
File History.
For Notepad in Windows 11 enable the option "Automatic backup" in settings OneDrive (Settings → Backup → Folders).