How to delete Notepad cache in Windows 11 Pro?

Anonymous
2023-12-24T04:10:41+00:00

Hello,

I used Notepad (just regular Notepad, not Notepad++) to open a somewhat sensitive file on a USB drive, then closed Notepad and removed the USB drive. Now I notice that when I open Notepad again, it automatically opens up the same file even with the USB drive not plugged in, so it obviously cached the file somewhere. Where is this cache? I'd like to shred the file. I looked in Users/<username>AppData/Roaming/, but I see nothing there for Notepad. There is no option to get the file location from within Notepad itself, something like 'File--> properties'. Both 'File --> Open' and 'File--> Save as' just default to my documents folder, and the file in question is not there. I am using Windows 11 Pro.

I know that Notepad settings can be changed to not open content from the previous session, but my priority right now is shredding the file from my drive.

Thanks for any help.

Windows for home | Windows 11 | Settings

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes
Answer accepted by question author
  1. Ramesh Srinivasan 173.7K Reputation points Volunteer Moderator
    2023-12-24T06:02:21+00:00

    Resetting Notepad should purge the confidential file from the caches.

    Open Settings, Apps.

    Click Installed Apps.

    Search for Notepad.

    Click on the ellipsis icon adjacent to "Notepad", and click "Advanced options"

    Image.

    In the resulting screen, click "Reset".

    52 people found this answer helpful.
    0 comments No comments

10 additional answers

Sort by: Most helpful
  1. Jonathan Deives 60,650 Reputation points Independent Advisor
    2023-12-24T04:55:14+00:00

    My name is Jonathan Deives. I'm an Independent Advisor and I'll be glad to help you today.

    Notepad itself does not have a cache, it is probably related to the recent files list by Windows, follow these steps and see if the problem persists.

    Open Notepad.

    Right-click on the Notepad icon in the taskbar.

    Right-click on the file you want to remove from the list.

    Select "Remove from list".

    If the file is still appearing, try clearing recent files from File Explorer;

    *Open File Explorer.

    *In the left sidebar, right-click on "Quick access."

    *Select "Options."

    *Under the "General" tab, find the "Privacy" section.

    *Click the "Clear" button next to "Clear File Explorer history."

    3 people found this answer helpful.
    0 comments No comments
  2. Anonymous
    2023-12-24T05:35:41+00:00

    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...

    Thanks for any help.

    0 comments No comments
  3. Jonathan Deives 60,650 Reputation points Independent Advisor
    2023-12-24T05:40:53+00:00

    Does notepad open directly to the file or can you access it through another file?

    0 comments No comments
  4. Anonymous
    2023-12-24T05:55:31+00:00

    Notepad was opening directly to the file, even though the USB drive containing the file was not plugged in anymore. Now that I've removed the file name from Notepad's file list (per your instructions), it won't directly open the file anymore, but the fact remains that the file contents are still somewhere on the hard drive. Hence my desire to find where it's cached so I can shred it.

    Thanks for any help

    1 person found this answer helpful.
    0 comments No comments