Community
    • Login

    Can't move over sessions

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    7 Posts 3 Posters 1.2k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • John HinzJ
      John Hinz
      last edited by

      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.

      EkopalypseE 1 Reply Last reply Reply Quote 0
      • EkopalypseE
        Ekopalypse @John Hinz
        last edited by

        @John-Hinz

        Would you please share the debug information of Notepad++ available in the last menu item, the ? menu, of the new setup?

        John HinzJ 1 Reply Last reply Reply Quote 1
        • John HinzJ
          John Hinz @Ekopalypse
          last edited by

          @Ekopalypse

          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)

          PeterJonesP 1 Reply Last reply Reply Quote 2
          • PeterJonesP
            PeterJones @John Hinz
            last edited by

            @John-Hinz ,

            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 copying session.xml, then the session info will be overwritten. The order of events should be:

            1. Exit all Notepad++ applications on the destination computer
            2. 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
            3. 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 at d:\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.

            John HinzJ 1 Reply Last reply Reply Quote 1
            • John HinzJ
              John Hinz @PeterJones
              last edited by

              @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.

              PeterJonesP 1 Reply Last reply Reply Quote 0
              • PeterJonesP
                PeterJones @John Hinz
                last edited by PeterJones

                @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:

                1. Debug Info
                  • Was the Debug Info you showed from the destination computer or the source computer?
                2. Exit all instances of Notepad++
                  • Did you exit all instances of Notepad++ like I said in step#1 before?
                  • If not, do so now
                3. 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?
                4. Run Notepad++
                  • Does it load the files from the new session.xml
                  • if so, problem solved. If not, continue with step 4:
                5. 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.
                6. 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.

                —

                • “FAQ: What is %AppData%”
                John HinzJ 1 Reply Last reply Reply Quote 2
                • John HinzJ
                  John Hinz @PeterJones
                  last edited by

                  @PeterJones

                  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.

                  1 Reply Last reply Reply Quote 1
                  • First post
                    Last post
                  The Community of users of the Notepad++ text editor.
                  Powered by NodeBB | Contributors