• Login
Community
  • Login

Cannot Open TXT Files - "Session file is either corrupted or not valid"

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
4 Posts 2 Posters 2.6k 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.
  • M
    MickardEMT
    last edited by May 2, 2019, 3:39 PM

    Sudden NPP Behavior Change - Cannot Open TXT Files

    I was working with a new program that allows configuration of the right-click menu in Windows, and suddenly NPP stopped being able to edit a TXT file

    This behavior is not only from a Windows folder, where you can either right-click or double-click to open a TXT file, but NPP will not open or edit files in the Light Explorer window or via Recent Files

    Furthermore, if I eliminate the TXT file extension, NPP will open the file. However, if the extension of TXT is on the file, I get the “Session file is either corrupted or not valid” message

    I rely on NPP for all my TXT file editing, so this is a huge problem. Any assistance will be greatly appreciated

    Michael

    M 1 Reply Last reply May 2, 2019, 4:41 PM Reply Quote 0
    • M
      Meta Chuh moderator @MickardEMT
      last edited by May 2, 2019, 4:41 PM

      @MickardEMT

      first thing i would try, is to remove the right click menu tool if possible.

      then try a repair install, using the same npp.7.6.6.installer.exe you used the last time. (i suppose you stayed at 32 bit because of textfx, but i’m not sure)

      if this does not solve the open with or double click on a file for notepad++ yet:

      • close notepad++ if it is open

      • right click on any .txt file and choose open with > choose other app and select notepad++ from this list. (if not available, see farther below)

      • select always use this app to open .txt filesand hit ok.

      • close notepad++ again and retry opening your .txt file by double clicking on it.

      if you are not able to select notepad++.exe form the choose other app list above:

      • close notepad++ if it is open

      • right click on your notepad++ icon and choose “run as administrator”
        (make sure you see [Administrator] at the top bar of your notepad++ window (see screenshot)

      • go to settings > preferences > file association and make sure your needed extensions, like .txt are visible at the registered extensions panel (last panel on the right) as seen on this screenshot:

      Imgur

      • hit close and exit notepad++

      • now reopen notepad++ normally, and go to settings > preferences > file association again, and make sure your needed extensions are also visible for the standard user account.

      • then exit notepad++ again

      • right click on any .txt file and choose open with > choose other app and select notepad++ from this list.

      • select always use this app to open .txt filesand hit ok.

      • close notepad++ again and retry opening your .txt file by e.g. double clicking on it.

      best regards and good luck.

      M 1 Reply Last reply May 2, 2019, 11:00 PM Reply Quote 1
      • M
        MickardEMT
        last edited by May 2, 2019, 5:04 PM

        Meta Chuh

        As always, your support and replies ROCK!!!

        I will try this shortly and let you know what happens

        Thank you. I will go thru these fixes shortly and report back

        Michael

        1 Reply Last reply Reply Quote 2
        • M
          MickardEMT @Meta Chuh
          last edited by May 2, 2019, 11:00 PM

          @Meta-Chuh

          Well, I have tried all the steps outlined, and have rebooted the laptop three times. I still cannot get NPP to open a TXT file

          It is still behaving as before, where if the file has no extension, it will open that file. A file with a TXT extension will not open if it is double-clicked, not open if the file is selected from the Light Explorer menu, and will not open if you use the File/Open method

          I did a different type of test and renamed a TXT file as an INI file. NPP opened that file without an error

          I also was able to open an INI file that was generated by another program, and I was able to open a Python file (PY)

          I am thinking it has to do with the Windows context editor I was trying to use. Just not sure how to enable the TXT files again. I am thinking it is a REGISTRY issue

          Michael

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