keepcalculator

06 Numbers and Powers

Stop Notepad From Opening Previous Files

Card No. 06·21394 · Updated · Standard formula, shown below

If you want to stop Notepad from reopening the files you had open the last time you used it, the fix is a simple setting change in Windows 10 and Windows 11: open Notepad, go to Settings, and turn off the option that says “Save session and reopen files at startup.” This setting controls whether Notepad restores your previous session, and disabling it makes Notepad start with a blank, untitled document every time.

Why Notepad Reopens Previous Files

Starting with the Windows 10 October 2018 update (version 1809), Microsoft introduced a session-restore feature to Notepad. The intent was to make it easier to pick up where you left off, similar to how browsers and many text editors restore your last session. When you close Notepad with files still open, Windows remembers those file paths and reopens them the next time you launch the app. This behavior is controlled by a single toggle in Notepad’s settings, which is on by default.

For many users this is a helpful convenience, but for others it’s an annoyance—especially if you use Notepad for quick notes and don’t want a pile of old tabs cluttering your workspace. The good news is that the feature is completely optional and can be turned off in a few clicks.

How to Disable the Setting in Windows 11

  1. Open Notepad. You can do this by searching for “Notepad” in the Start menu or by pressing Win + R, typing notepad, and pressing Enter.
  2. Click the gear icon (Settings) in the bottom-left corner of the Notepad window. In some versions, it may be in the top-right corner.
  3. In the Settings pane, look for the section labeled “Startup” or “App startup.”
  4. Find the toggle that says “Save session and reopen files at startup.”
  5. Turn the toggle off.

After you do this, close Notepad and reopen it. You should see a blank, untitled document instead of your previous files. The change takes effect immediately, and you don’t need to restart your computer.

How to Disable the Setting in Windows 10

  1. Open Notepad.
  2. Click the gear icon in the top-right corner of the window.
  3. Scroll down to the “Startup” section.
  4. Uncheck the box that says “Save session and reopen files at startup.”
  5. Close the Settings pane and restart Notepad.

In Windows 10, the setting is a checkbox rather than a toggle, but the effect is identical. If you don’t see the option, make sure your Windows 10 is updated to at least version 1809, as earlier versions of Notepad did not have this feature.

What If the Setting Doesn’t Work?

If you’ve turned off the setting but Notepad still opens previous files, try the following troubleshooting steps:

  • Check for multiple Notepad windows: If you have multiple Notepad instances open, close them all before testing. The setting applies to the app globally, but a stray window might still be holding the session.
  • Restart Notepad completely: Close all Notepad windows and reopen it. Sometimes the setting doesn’t apply until the app is fully restarted.
  • Update Windows: Make sure you have the latest Windows updates installed. Older builds had bugs where the setting didn’t persist.
  • Check the registry (advanced): If the setting still doesn’t stick, you can try a registry edit. Open the Registry Editor (regedit) and navigate to HKEY_CURRENT_USER\Software\Microsoft\Notepad. Look for a DWORD value named fSaveSession. Set it to 0 to disable session saving. If it doesn’t exist, create it as a DWORD (32-bit) and set the value to 0. Restart Notepad. (Be careful when editing the registry—make a backup first.)

Common Misconceptions

One common misconception is that the “reopen files” behavior is tied to Windows’ “Restart apps” feature, which you can find in Settings > Accounts > Sign-in options. That feature reopens apps after a system restart or sign-in, but it’s separate from Notepad’s session restore. Even if you disable “Automatically save my restartable apps and restart them when I sign back in,” Notepad will still reopen its own session unless you change its specific setting.

Another misconception is that the setting only affects files you saved. In reality, Notepad also restores unsaved changes to files that were open when you closed the app. This is because the session restore feature includes unsaved content in its snapshot. If you want to keep that safety net but avoid reopening files, there’s no built-in way to separate the two—you either get both or neither.

Alternatives for Managing Notepad Sessions

If you like the idea of restoring your session but find the all-or-nothing approach limiting, consider these alternatives:

  • Use a different text editor: Editors like Notepad++ or Visual Studio Code offer more granular session controls, such as remembering only certain files or asking before restoring.
  • Manually save your work: If you often have several files open, make it a habit to save them to a specific folder and reopen them manually. This gives you full control without any settings.
  • Create a shortcut with a script: You can create a batch file that opens Notepad and then clears its recent session by writing to the registry, but this is overkill for most users.

For most people, simply turning off the setting is the cleanest solution. If you rarely use Notepad for long sessions, the default behavior is probably more annoying than helpful, so disabling it makes sense.

Frequently Asked Questions

Will disabling this setting affect my unsaved changes?

Yes. If you disable the session restore feature, Notepad will no longer remember unsaved changes when you close it. If you close a file with unsaved changes, you’ll lose them unless you save manually. If you rely on that safety net, you might want to keep the setting on.

Does this setting affect the Windows 11 Notepad app from the Microsoft Store?

Yes, the setting is available in both the classic Notepad and the newer Notepad app that Microsoft ships with Windows 11. The location might differ slightly—in the new app, it’s under Settings > App startup—but the option is the same.

Can I stop Notepad from reopening files only sometimes?

No, Notepad doesn’t offer a per-session choice. It’s either always restore or never restore. If you want occasional restoration, you’ll need to use a third-party editor or manually reopen files.

Why does Notepad reopen files even after I turn off the setting?

This usually happens because the setting didn’t save properly or because you have an older version of Notepad. Try updating Windows, then toggle the setting off and on again. If that fails, use the registry method described above.

Does this setting affect the command line?

No. If you launch Notepad from the command line with a specific file, that file will open, but the session restore only applies to the files that were open when you last closed the app. The setting doesn’t interfere with command-line arguments.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Numbers and Powers drawer →