Save multiple instances of Notepad


maarkr

Well-known member
Member
Local time
4:09 AM
Posts
39
OS
11 Pro
I want to save multiple instances of Notepad with each instance containing different txt files. Tried Notepad++ but I don't need the programming interface. tried an app called Notepads which I liked but I couldn't find a feature to save several instances so I can group similar txt files in each instance.
 
Windows Build/Version
25H2 26200.7623

My Computer

System One

  • OS
    11 Pro
    Computer type
    PC/Desktop
    CPU
    Intel Core i9-12900kf
    Motherboard
    Gigabyte Z790 AX LGA1700
    Memory
    KLEVV CRAS XR5 RGB DDR5 32GB (2x16GB) 7000MHz
    Graphics Card(s)
    MSI Geforce RTX 2060 Super ARMOR OC 128bit PCIE3 8GbGDDR6
    Sound Card
    MOTU Ultralite mk4
    Monitor(s) Displays
    2
    Hard Drives
    Samsung 980 SSD NVme 1Tb
    other drives
    PSU
    Corsair 750w
Why don't you configure Notepad for this?


notepad1.webp

notepad2.webp

You can also configure Notepad for how it acts when you close it. Notepad can either continue where it left off or discard changes.


notepad3.webp
 

My Computers

System One System Two

  • OS
    Windows 11 Pro 25H2 (26200.6901)
    Computer type
    Laptop
    Manufacturer/Model
    ASUS TUF Gaming A15 (2022)
    CPU
    AMD Ryzen 7 6800H with Radeon 680M GPU (486MB RAM)
    Memory
    Crucial DDR5-4800 (2400MHz) 32GB (2 x 16GB)
    Graphics Card(s)
    NVIDIA RTX 3060 Laptop (6GB RAM)
    Sound Card
    n/a
    Monitor(s) Displays
    15.6-inch
    Screen Resolution
    1920x1080 300Hz
    Hard Drives
    2 x Samsung 990 Evo Plus (2TB M.2 NVME SSD)
    PSU
    n/a
    Mouse
    Wireless Mouse M510
    Internet Speed
    2100Mbps/300Mbps
    Browser
    Firefox
    Antivirus
    Malwarebytes
  • Operating System
    Windows 11 Pro 25H2 (26200.8246)
    Computer type
    PC/Desktop
    Manufacturer/Model
    Custom build
    CPU
    AMD Ryzen 7 5700X3D
    Motherboard
    ASUS ROG Strix B550-F Gaming WiFi II
    Memory
    G.SKILL Flare X 32GB (2x16GB) DDR4
    Graphics card(s)
    ASUS ROG-STRIX-RTX3060TI-08G-V2-GAMING (RTX 3060-Ti, 8GB RAM)
    Monitor(s) Displays
    Samsung G50D IPS 27"
    Screen Resolution
    1440p/180Hz
    Hard Drives
    SAMSUNG 990 EVO Plus (2TB] M.2 NVME SSD
    SAMSUNG 990 EVO Plus (4TB) M.2 NVME SSD
    PSU
    Corsair RM750x (750 watts)
    Case
    Cooler Master MasterCase 5
    Cooling
    Scythe Mugen 6
    Keyboard
    Logitech K520 (MK540 keyboard/mouse combo)
    Mouse
    Logitech M310 (MK540 keyboard/mouse combo)
    Internet Speed
    2100 Mbps down / 300 Mbps up
    Browser
    Firefox, Edge, Chrome
    Antivirus
    Malwarebytes (Premium)
    Other Info
    ASUS Blu-ray Burner BW-16D1HT (SATA) || Western Digital Easystore 20TB USB 3.0 external hard drive used with Acronis True Image 2025 backup software || HP OfficeJet Pro 6975 Printer/Scanner
so if I want many different sessions of notepad, like one for animals, one for boats, one for cars, each having 10 txt files, I can save the first txt file in each session named 'animals'...etc. and save a shortcut to that file to open the session (group). edit: i thought it would work...but no, it wants to remove files saved in the session.
 
Last edited:

My Computer

System One

  • OS
    11 Pro
    Computer type
    PC/Desktop
    CPU
    Intel Core i9-12900kf
    Motherboard
    Gigabyte Z790 AX LGA1700
    Memory
    KLEVV CRAS XR5 RGB DDR5 32GB (2x16GB) 7000MHz
    Graphics Card(s)
    MSI Geforce RTX 2060 Super ARMOR OC 128bit PCIE3 8GbGDDR6
    Sound Card
    MOTU Ultralite mk4
    Monitor(s) Displays
    2
    Hard Drives
    Samsung 980 SSD NVme 1Tb
    other drives
    PSU
    Corsair 750w
so if I want many different sessions of notepad, like one for animals, one for boats, one for cars, each having 10 txt files, I can save the first txt file in each session named 'animals'...etc. and save a shortcut to that file to open the session (group). edit: i thought it would work...but no, it wants to remove files saved in the session.
What do you mean it wants to remove them? I just tested:

Test1.txt - saved this file
- 2nd tab with text “test2”
- 3rd tab with text “test3”
Were opened in Test1.txt notepad app instance

Test4.txt - saved this file
- 2nd tab with text “test5”
- 3rd tab with text “test6”
Were opened in Test4.txt notepad app instance

Killed notepad via task manager. When I launched notepad it opened 2 instances exactly as I have them listed above. The 2nd and 3rd tabs in both instances were not saved either (only the temp bak/bin files were when notepad saved it’s instances)
 

My Computer

System One

  • OS
    Windows 11 Pro
Killed notepad via task manager. When I launched notepad it opened 2 instances exactly as I have them listed above. The 2nd and 3rd tabs in both instances were not saved either (only the temp bak/bin files were when notepad saved it’s instances)

Same results for me.
 

My Computers

System One System Two

  • OS
    Windows 11 Pro 25H2 Build 26200.8655
    Computer type
    PC/Desktop
    Manufacturer/Model
    Sin-built 2013
    CPU
    Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz
    Motherboard
    ASUS ROG Maximus VI Formula
    Memory
    32.0 GB of I forget and the box is in storage.
    Graphics Card(s)
    Gigabyte nVidia GeForce GTX 1660 Super OC 6GB
    Sound Card
    Onboard thingy
    Monitor(s) Displays
    5 x LG 25MS500-B - 1 x 24MK430H-B - 1 x Wacom Pro 22" Touch Screen Tablet
    Screen Resolution
    All over the place
    Hard Drives
    Too many to list.
    OS on Samsung 1TB 870 QVO SATA
    PSU
    Silverstone 1500
    Case
    NZXT Phantom 820 Full-Tower Case
    Cooling
    Noctua NH-D15 Elite Class Dual Tower CPU Cooler / 6 x EziDIY 120mm / 2 x Corsair 140mm somethings / 1 x 140mm Thermaltake something / 2 x 200mm Corsair.
    Keyboard
    Corsair K95 / Logitech diNovo Edge Wireless
    Mouse
    Logitech: G402 / G502 / Mx Masters / Mx Air Cordless
    Internet Speed
    2000/500Mbps
    Browser
    All sorts
    Antivirus
    Kaspersky Premium
    Other Info
    ㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
    TP-Link BE9300 WiFi 7 Bluetooth 5.4 (Archer TBE550E)
    TP-Link TX201 V1 2.5GB Lan

    Grandstream HT812 - VoIP
    ASUS DSL-AX82U - Mesh
    ASUS RT-AC68U - Mesh
    ASUS RT-BE88U Router

    Brother MFC-L2880DW Printer

    I’m on a horse.
  • Operating System
    Windows 11 Pro 25H2 Build 26200.8655
    Computer type
    Laptop
    Manufacturer/Model
    LENOVO Yoga 7 14IRL8 - 7i EVO OLED 14" Touchscreen i5 12 Core 16GB/512GB
    CPU
    Intel Core 12th Gen i5-1240P Processor (1.7 - 4.4GHz)
    Memory
    16GB LPDDR5 RAM
    Graphics card(s)
    Intel Iris Xe Graphics Processor
    Sound Card
    Optimized with Dolby Atmos®
    Screen Resolution
    QHD 2880 x 1800 OLED
    Hard Drives
    M.2 512GB
    Antivirus
    Defender / Malwarebytes
    Other Info
    …still on a horse.
here, to make it a simple 1-click solution:

1 click will terminate notepad.exe if it is running, IF it is already NOT running, clicking this will launch notepad.exe. ENSURE that you have restore previous sessions enabled in notepad's settings (see post #2 @MisterEd image)

.exe is inside attached .zip file for convenience. it has the notepad app icon so you can pin it to start or taskbar and it will appear just like notepad

AHK code inside the attached exe:
Code:
#SingleInstance Force

notepadPath := A_WinDir "\System32\notepad.exe"

if ProcessExist("notepad.exe") {
    ProcessClose "notepad.exe"
} else {
    Run notepadPath
}

ExitApp
 

Attachments

My Computer

System One

  • OS
    Windows 11 Pro
What do you mean it wants to remove them? I just tested:

Test1.txt - saved this file
- 2nd tab with text “test2”
- 3rd tab with text “test3”
Were opened in Test1.txt notepad app instance

Test4.txt - saved this file
- 2nd tab with text “test5”
- 3rd tab with text “test6”
Were opened in Test4.txt notepad app instance

Killed notepad via task manager. When I launched notepad it opened 2 instances exactly as I have them listed above. The 2nd and 3rd tabs in both instances were not saved either (only the temp bak/bin files were when notepad saved it’s instances)
If you configure Notepad to launch a new instance of every time you open a file then the contents of files in any of the tabs won't be saved automatically. If you have Notepad configured this way then you have to manually save the contents of each tab. Otherwise they will be lost if you kill Notepad or reboot.

If want the contents of all tabs to survive closing Notepad or rebooting then you have to configure Notepad to only use one instance. That is annoying but that is the way it works.

To configure Notepad to only use one instance and automatically preserve the contents of all tabs then you have to configure Notepad this way...


np1.webp

I tested this with files open in 3 tabs. I modified the contents of the files in each tab. I then closed Notepad by clicking on the "X" in the upper right. I then rebooted the computer. I launched Notepad. All 3 tabs were still there. The changes I made in each tab were still there. Note if I close any of the tabs then I must first save the contents of that tab. Otherwise I will lose any changes.

np2.webp
 

My Computers

System One System Two

  • OS
    Windows 11 Pro 25H2 (26200.6901)
    Computer type
    Laptop
    Manufacturer/Model
    ASUS TUF Gaming A15 (2022)
    CPU
    AMD Ryzen 7 6800H with Radeon 680M GPU (486MB RAM)
    Memory
    Crucial DDR5-4800 (2400MHz) 32GB (2 x 16GB)
    Graphics Card(s)
    NVIDIA RTX 3060 Laptop (6GB RAM)
    Sound Card
    n/a
    Monitor(s) Displays
    15.6-inch
    Screen Resolution
    1920x1080 300Hz
    Hard Drives
    2 x Samsung 990 Evo Plus (2TB M.2 NVME SSD)
    PSU
    n/a
    Mouse
    Wireless Mouse M510
    Internet Speed
    2100Mbps/300Mbps
    Browser
    Firefox
    Antivirus
    Malwarebytes
  • Operating System
    Windows 11 Pro 25H2 (26200.8246)
    Computer type
    PC/Desktop
    Manufacturer/Model
    Custom build
    CPU
    AMD Ryzen 7 5700X3D
    Motherboard
    ASUS ROG Strix B550-F Gaming WiFi II
    Memory
    G.SKILL Flare X 32GB (2x16GB) DDR4
    Graphics card(s)
    ASUS ROG-STRIX-RTX3060TI-08G-V2-GAMING (RTX 3060-Ti, 8GB RAM)
    Monitor(s) Displays
    Samsung G50D IPS 27"
    Screen Resolution
    1440p/180Hz
    Hard Drives
    SAMSUNG 990 EVO Plus (2TB] M.2 NVME SSD
    SAMSUNG 990 EVO Plus (4TB) M.2 NVME SSD
    PSU
    Corsair RM750x (750 watts)
    Case
    Cooler Master MasterCase 5
    Cooling
    Scythe Mugen 6
    Keyboard
    Logitech K520 (MK540 keyboard/mouse combo)
    Mouse
    Logitech M310 (MK540 keyboard/mouse combo)
    Internet Speed
    2100 Mbps down / 300 Mbps up
    Browser
    Firefox, Edge, Chrome
    Antivirus
    Malwarebytes (Premium)
    Other Info
    ASUS Blu-ray Burner BW-16D1HT (SATA) || Western Digital Easystore 20TB USB 3.0 external hard drive used with Acronis True Image 2025 backup software || HP OfficeJet Pro 6975 Printer/Scanner
If want the contents of all tabs to survive closing Notepad or rebooting then you have to configure Notepad to only use one instance. That is annoying but that is the way it works.

Note if I close any of the tabs then I must first save the contents of that tab. Otherwise I will lose any changes.
No, you don’t. I explained exactly how to do it in my post. Any number of instances will relaunch if you do as I stated.
 

My Computer

System One

  • OS
    Windows 11 Pro
Back
Top Bottom