windows - Utility or command to save all open Notepad instances somewhere
2014-07
From time to time I find myself using Notepad instead of Notepad++ or a better editor. Sometimes I even put important stuff in those notepad windows.
When it comes time to restart my PC, I often have as many as 20 open notepad instances. Granted, most of these are useless, but I have to scan each one to see if there is anything worth saving.
Is there any utility or command available that would do any of the following:
- Save all open notepads to a single file
- Save all open notepads to default named files
- Save the instances of notepad in memory to disk so they start on reboot
What is happening:
Initially my cursor was at "initially here". When I press Ctrl+S
to save the file my cursor automatically moves to the second position.
After many tries, I've seen that it randomly moves to a point one or two lines above the place where it initially was.
(The red line is the cursor - I've drawn it manually since it wont show up in printscreen)
Did anyone notice this thing?
My version of Notepad is:
It is a problem since I keep typing and whenever I save, I have to manually bring the cursor down to the correct place or else I am typing somewhere between the lines!
I noticed this problem in Windows XP Notepad. It only happens if word wrap is on when you save. The amount the cursor moves back is related to the number of new wrap points before the cursor since the last save. The more new wrap points before the cursor, the further the cursor moves back.
Why does the cursor move? When you save with word wrap on, Notepad inserts CR CR LF characters at each wrap point in the display window (but not in the saved file). The number of characters from the beginning of the display window to the cursor stays the same, but because of the extra CR CR LF characters, the cursor appears to move backward.
For more information and a step-by-step example, see Notepad bug: Saving with word wrap on inserts CR CR LF characters in the display window.
Regardless of whether this is a bug, if you are doing anything in notepad regularly enough for this to be an issue, you need to start using a better text editor. Try the free notepad++ for a start - http://notepad-plus.sourceforge.net/
Open your Registry editor, and in Current User locate the following key:
HKEY_CURRENT_USER\Software\Microsoft\Notepad
then
- Create a new DWORD value called
fSavePageSettings
and set it to "1" - if
fSaveWindowPositions
doesn't exist then Create DWORD and set it to "1"