Can't move over sessions
-
Hello,
In the past when migrating from one computer to the other, I had no issues copying the session file from my old computer and pasting it in my new computer under user/appdata/roaming. For some reason I am unable to do this now. after I transfer over my old session file, notepad plus will just open up with a single blank session open. Any Ideas? I even upgraded both versions to 8.4.9 and even tried copying over the entire Notepad++ folder under my user/appdata/roaming but still didn’t make a difference.
-
Would you please share the debug information of Notepad++ available in the last menu item, the
?
menu, of the new setup? -
Thanks for your response. please see below
Notepad++ v8.4.9 (64-bit)
Build time : Jan 27 2023 - 03:11:16
Path : C:\Program Files\Notepad++\notepad++.exe
Command Line :
Admin mode : OFF
Local Conf mode : OFF
Cloud Config : OFF
OS Name : Windows 11 (64-bit)
OS Version : 22H2
OS Build : 22621.1194
Current ANSI codepage : 1252
Plugins :
mimeTools (2.9)
NppConverter (4.5)
NppExport (0.4) -
Thanks for the Debug Info: it confirms that you weren’t using local config or cloud config, so
session.xml
should go in%AppData%\Notepad++\session.xml
.My next guess: When Notepad++ exits, it overwrites whatever is in
session.xml
, so if you forgot to completely exit from all instances of Notepad++ before copyingsession.xml
, then the session info will be overwritten. The order of events should be:- Exit all Notepad++ applications on the destination computer
- Copy
session.xml
from the source computer to the destination computer’s%AppData%\Notepad++
folder (or as you called it, “user/appdata/roaming”) and make sure the date and size is updated - Start one instance of Notepad++ on the destination machine, and it should use the
session.xml
If that doesn’t work, then maybe all the files are in different paths on the old computer vs the new computer. The session file stores the full path to each file. So if a file was at
c:\path\on\oldmachine\filename.txt
on the old machine, but is atd:\different\path\filename.txt
on the new machine, Notepad++ will not be able to see the file, and thus will not open it, making it look like the session was empty when in reality it just did not have any files that Notepad++ could find when it tried to open them. -
@PeterJones Thanks for your response. Unfortunately the only thing that changed is the username itself in the directory.
You are correct that notepad++ on the destination machine appears to be overwriting the session file I put in the notepad++ directory. I did try copying over the entire notepad++ folder as well but it didn’t seem to make a difference.
I also tried older version of notepad++ on the destination machine but it did not make a difference. It’s a very odd issue as I never had this issue before in the past.
-
@John-Hinz said in Can’t move over sessions:
I did try copying over the entire notepad++ folder as well but it didn’t seem to make a difference.
I can see no way in which that statement can be true, unless I have misunderstood something you told us, or something else you have told us was so vague that my subconscious interpretation of it is misleading me, or something you have said doesn’t match your actual situation.
notepad++ on the destination machine appears to be overwriting the session file I put in the notepad++ directory
Note: it should only do that if Notepad++ is running when you do the copy.
Your reply was too vague for me to know if you actually followed those three steps, or what the results were when you tried them. So I guess I will have to ask more specific questions along the way:
- Debug Info
- Was the Debug Info you showed from the destination computer or the source computer?
- Exit all instances of Notepad++
- Did you exit all instances of Notepad++ like I said in step#1 before?
- If not, do so now
- Copy:
- What is the size and timestamp of the source
session.xml
? - What was the old size and timestamp of the destination
session.xml
before you do the copy? - Copy from the source to the destination.
- What is the new size and timestamp of the destination
session.xml
after you do the copy?
- What is the size and timestamp of the source
- Run Notepad++
- Does it load the files from the new
session.xml
- if so, problem solved. If not, continue with step 4:
- Does it load the files from the new
- File > Open and pick
%AppData%\Notepad++\session.xml
- There should be a list of files in the
session.xml
– which should match the source session.xml at this point. - If it does not, you have done something in between the steps that I have listed, or you didn’t successfully copy the file that you thought you did
- If you look at the paths for those files, do those files exist on the destination machine, in those exact paths?
- If not, that’s your problem. If so, continue.
- There should be a list of files in the
- Try File > Load Session… and pick
%AppData%\Notepad++\session.xml
.- Does Notepad++ load those files now?
- If not, then the files don’t exist, despite what you answered above.
Until you answer every single one of those questions, I cannot provide any more help.
—
- Debug Info
-
I figured it out thanks to your help. Your previous mentioned the file path the sessions file was referencing. On my old computer my username was “user” while on my new computer its “John” The session file has “user” referenced and not "John so I simply made a new directory where the session file was referencing that had my old notepad++ folder. That seemed to do the trick. Thanks again for pointing me in the right direction.