Moving Notepad++ to new computer *Including all the opened tabs"
-
I’m not sure if this is the right way to do this, but I’m having a heck of a time doing something that feels like it should work. I am attempting to move Notepad++ from one PC to another, including all the tabs and unsaved notes that I have open on the source PC.
I’ve done exactly what this thread says to do, yet when I open Notepad++ on the target \ new computer noting is open. It’s as if I’m looking at a brand new install.
Here were my steps.
- Installed exact same version of Notepad++ on new PC
- installed all the same plugins
- Renamed c:\program files\Notepad++ to Notepad++.old
- Renamed c:\users<myuser>\appdata\roaming\Notepad++ to Notepad++.old
- Copied both Notepad++ directories from source to target
- Started notepad.
Is it possible to do what I want?
-
including all the tabs and unsaved notes
If you don’t have the same files in the same directories on the computer, you are not going to see them on the new computer (for the saved files). For the unsaved files, if my final paragraph below doesn’t help, then your best bet might be to save the files, then copy those files to the new computer, then open them.
I’ve done exactly what this thread says to do
No you didn’t
- Installed exact same version of Notepad++ on new PC
- installed all the same plugins
Those were good first steps
- Renamed c:\program files\Notepad++ to Notepad++.old
Bad idea. That was never suggested in that other thread. Basically, you just unintstalled Notepad++ without telling Windows, and rendered pointless the good first two good steps
- Renamed c:\users<myuser>\appdata\roaming\Notepad++ to Notepad++.old
That seems reasonable
- Copied both Notepad++ directories from source to target
Copying the
%AppData%\Notepad++
(or, as you phrased it,c:\users<myuser>\appdata\roaming\Notepad++
) is the right way to get all the settings moved over, including the active session and (if you have the options set that way) any unsaved files that Notepad++ was currently tracking in%AppData%\Notepad++
But in the
C:\Program Files\Notepad++
directory, you didn’t need to copy anything over, especially since you had installed Notepad++ already and already installed all the plugins (that was my “it’s better to just…” recommendation from 4 years ago, and that recommendation still stands).But at this point, rather than undoing what you did, you should close Notepad++ on the new machine, re-copy the
%AppData%\Notepad++\backup\
directory and all contents from the old machine and put them in that same folder on the new machine, and copy the old%AppData%\Notepad++\session.xml
to the new machine. Then start Notepad++ on the new machine. It should read the session.xml and the backup directory and _should _ reload your files on the new machine. If it doesn’t, please share your ?-menu’s Debug Info so we can confirm what your machine thinks the right locations are, and then help you figure out where your config has gone different between the two. -
@PeterJones I appreciate you willingness to help. Thank you.
I figured things out… turns out I had overlooked the fact that the directory name in the %AppData% path was different between the source and target, even though the user name is the same. I’m blaming this on a difference in OS versions. The Source is on Windows 11 the target is Windows 10… it looks like the naming of the %AppData% directory path based on user name is shortened in Win 11.
My user id is phankins on both systems. In Windows 11 the path is C:\Users\phank… where as on Windows 10 the path is C:\Users\phankins…
Both sessions.xml and config.xml have references to this path. So as soon as I figure this difference out, all I had to do was replace the user id portion of the target’s %AppData% directory name with the correct one and viola I got what I needed.
Hope this helps other users who run into this… It’s not really mentioned in any of the articles or posts floating around on the interwebs… all that gets said is similar to what you said…
@PeterJones said in Moving Notepad++ to new computer *Including all the opened tabs":
on the new machine, re-copy the %AppData%\Notepad++\backup\ directory and all contents from the old machine and put them in that same folder on the new machine, and copy the old %AppData%\Notepad++\session.xml to the new machine. Then start Notepad++ on the new machine. It should read the session.xml and the backup directory and _should _ reload your files on the new machine.
Problem with this is that if there is a difference in the actual directory names between the source and target, then just copying the files over will not work. The directory path names need to be changed in the source.xml and config.xml files on the target to point to the new directory name for %AppData%.
-
Glad you found it.
The directory path names need to be changed in the
source.xml[session.xml] and config.xml files on the target to point to the new directory name for %AppData%That is true: since session.xml and other config files use full paths without windows variable expansion, they cannot just store
%AppData%
and instead store a hardcoded path. With a hardcoded path, then purely copying is not sufficient.