I am straddling a fence but with increasing weight on my Win 11 foot.
I use Everything 1.5 to search for all files of the form eraseme(1). About a dozen files are found. I delete these files, rerun the search in Everything and am told that no such files exist.
I then load Notepad and am presented with the contents of “Eraseme.txt”
I run a third Everything search, this time for “Eraseme.txt” and am told that no such file exists.
Why is Win11 notepad able to find a file that Everything 1.5 says does not exist?
(1) In Everything, the string "eraseme" will find ANY file that has those seven characters "eraseme" ANYWHERE within the full name (drive, path, name, extent) of a file.
Thanks for any suggestions
Chris
Notepad opens deleted files?
-
- PlutoniumLounger
- Posts: 17030
- Joined: 24 Jan 2010, 23:23
- Location: brings.slot.perky
Notepad opens deleted files?
You do not have the required permissions to view the files attached to this post.
It is better to Aim High and Fail than to aim low and succeed.
-
- BronzeLounger
- Posts: 1315
- Joined: 24 Jan 2010, 12:14
- Location: Sitting in my computer chair!
Re: Notepad opens deleted files?
Did you make a backup of your computer which would also contain your deleted files? Maybe everything is finding this file on your backup in the "trash bin" folder? Just a thought....
Skitterbug 
A cup of coffee shared with a friend is happiness tasted and time well spent.

A cup of coffee shared with a friend is happiness tasted and time well spent.
-
- Administrator
- Posts: 7375
- Joined: 15 Jan 2010, 22:52
- Location: Middle of England
Re: Notepad opens deleted files?
If you Google 'notepad cache', you may find some answers.ChrisGreaves wrote: ↑16 Jan 2025, 13:40...
I then load Notepad and am presented with the contents of “Eraseme.txt”
...
Leif
-
- Panoramic Lounger
- Posts: 8843
- Joined: 25 Jan 2010, 09:09
- Location: retirement
Re: Notepad opens deleted files?
Presumably because Win 11 Notepad is caching the last opened text file in a file that's not called 'eraseme.txt'. In which case search for a string, say, 'ICE CONTROL POLICY' and see if it finds a file containing that.ChrisGreaves wrote: ↑16 Jan 2025, 13:40...Why is Win11 notepad able to find a file that Everything 1.5 says does not exist?...
Alternatively, Everything does not search hidden files and folders, including those deemed to be doubly hidden because they are 'system' files. In which case in Win 11 Notepad is caching the last opened text file in a hidden location where Everything is not looking.
Ken
-
- PlutoniumLounger
- Posts: 17030
- Joined: 24 Jan 2010, 23:23
- Location: brings.slot.perky
Re: Notepad opens deleted files?
Thanks, Leif.
Stack Overflow discusses the Notepad+(Notepad++) and just checked that although when I use Ctrl+Esc and type Notepad, it is "Notepad" and not Notepad+ that shows up, the notepad text editor supports multiple tabs (as in File, New Tab; so now I am no longer using NotePad but Notepad-with-tailfins. Sigh.
How to delete Notepad cache in Windows 11 Pro? confuses me further by starting off "I used Notepad (just regular Notepad, not Notepad++) to open a somewhat sensitive file ..." so presumably there is some difference.
Then "larger concern is the fact that Notepad was still able to load the contents of the file, even though I removed the USB drive that contained the file." Gaaaaah!
I followed the "reset" advice and that appeared to have worked.
But Settins goes on to warn that "Notepad automatically saves your progress ... next time you open Notepad", so it looks as if Microsoft is trying very hard to keep me addicted to DOS BATch files that I can run at reboot time from my AutoExec.bat

Thanks again; Chris
This might make me switch to an alternative to Win11 Notepad.exe.
Thanks again
It is better to Aim High and Fail than to aim low and succeed.
-
- PlutoniumLounger
- Posts: 17030
- Joined: 24 Jan 2010, 23:23
- Location: brings.slot.perky
Re: Notepad opens deleted files?
Thanks Skitterbug for your keen interest in my backup procedures, but no, the problem is not with my RoboCopy backups.Skitterbug wrote: ↑16 Jan 2025, 13:47Did you make a backup of your computer which would also contain your deleted files? Maybe everything is finding this file on your backup in the "trash bin" folder? Just a thought....
The problem, I gather, lies in Dear Old Notepad in Win11 which is NOT the Dear Old Notepad that we have been using since childhood.
I can imagine that some people might find it interesting to, in effect, have Notepad open the Most Recently Used file when Notepad is next run; I would not. But the links in Leif's suggestion of a web search in one case point out that the data is being presented when the storage device (memory key) is not in use.
Thanks for the quick reply, Jonathan. That lets me remove the file name from Notepad's list, but the larger concern is the fact that Notepad was still able to load the contents of the file, even though I removed the USB drive that contained the file. I don't want the contents of the text file to be anywhere on my hard drive, and want to shred whatever file is storing that data. If Notepad doesn't have its own cache, then there must be a different cache (a Windows cache?) that has the file contents in it. Do you know where this would be?? Doing a windows explorer search for the file name only returned shortcuts that point to the USB drive that is no longer plugged in. But somehow Notepad still had access to the file contents...
Given some people's propensity to store passwords and/or other sensitive data in an interim Notepad file, I find that risky.
Cheers, Chris
It is better to Aim High and Fail than to aim low and succeed.
-
- Administrator
- Posts: 80372
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Notepad opens deleted files?
If you don't want Notepad to cache a text that you entered or opened, close the tab and answer 'Don't save' instead of closing the Notepad window.
Ctrl+W is the keyboard shortcut for closing the current tab.
Ctrl+W is the keyboard shortcut for closing the current tab.
You do not have the required permissions to view the files attached to this post.
Best wishes,
Hans
Hans
-
- PlutoniumLounger
- Posts: 17030
- Joined: 24 Jan 2010, 23:23
- Location: brings.slot.perky
Re: Notepad opens deleted files?
I recall being perturbed by this behaviour before. I suspect that Win11 Notepad caches all the tabs it thinks are in use at this time.
Nice TryAlternatively, Everything does not search hidden files and folders, including those deemed to be doubly hidden because they are 'system' files. In which case in Win 11 Notepad is caching the last opened text file in a hidden location where Everything is not looking.


I have not previously played with hidden files, but I took a copy of my "Calendar.doc", copied it to another folder and set the attributes to Hidden.
Reloading (!!) Everything and searching for Calendar.doc showed TWO files, from which I inferred that Everything does find EVERYTHING on your hard drive, including hidden files.
This post suggests that Everything finds hidden files by default, but please don't quote me on that.
If I weren't so busy shoveling snow and preserving turnips I could start Everything searching by "Content:" for the strings in that Notepad file and see if anything turns up. That would only show me where plain-text was stored, but would not locate the text (by Content) if it were encoded, for example, in Hollerith punched card codes. You never know. This is MSoft after all.
There is at least a Masters, possibly a PHD for anyone who can quantify the time we all waste recovering from the latest tail fins compared to the time saved by the boffin who suggested the idea to MSoft.
I'd even throw in a free subscription to Eileen's Lounge.
Cheers, Chris
Cheers, Chris
It is better to Aim High and Fail than to aim low and succeed.
-
- Administrator
- Posts: 80372
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Notepad opens deleted files?
As mentioned in the Microsoft Community thread you linked to higher up in this thread, the Notepad cache folder is
%localappdata%\Packages\Microsoft.WindowsNotepad_8wekyb3d8bbwe\LocalState\TabState
The text cached by Notepad is stored in .bin files with a GUID as name, so completely unrelated to the original filename.
%localappdata%\Packages\Microsoft.WindowsNotepad_8wekyb3d8bbwe\LocalState\TabState
The text cached by Notepad is stored in .bin files with a GUID as name, so completely unrelated to the original filename.
You do not have the required permissions to view the files attached to this post.
Best wishes,
Hans
Hans