• Login
Community
  • Login

Saving with Notepad++ removes alternate data streams

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
7 Posts 4 Posters 5.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.
  • N
    NotepadPlusUser
    last edited by Feb 11, 2016, 6:12 AM

    Suppose that a file Test.txt has two alternate data stream files associated with it. When I edit the file with Notepad++, and then save it (Ctrl + S), the ADS files have been removed.

    This doesn’t happen with Notepad, and with UEStudio, there is a setting to prevent it.

    QUESTION: How do I save a file in Notepad++ without removing the alternate data streams?

    C 1 Reply Last reply Feb 11, 2016, 8:58 PM Reply Quote 0
    • C
      Claudia Frank @NotepadPlusUser
      last edited by Claudia Frank Feb 11, 2016, 9:00 PM Feb 11, 2016, 8:58 PM

      @NotepadPlusUser
      unfortunattely this seems to be a bug.

      @devs
      put the following into a batch file

      @echo some text > %1
      @echo hidden text > %1:ads_part.txt
      type %1
      @echo.
      more < %1:ads_part.txt
      
      @echo.
      @echo open the file %1 with npp, change it and save it.
      @echo.
      
      pause
      
      type %1
      @echo.
      more < %1:ads_part.txt
      

      save it and call it like

      ads.bat myfile.txt
      

      It will create the file and an additional data stream(ad_part.txt) file,
      writes text to both,
      outputs the file content of myfile.txt and of ad_part.txt.
      Then batch asks to open myfile.txt with npp and waits until enter is pressed.
      If loaded within npp, change something and save it.
      Press enter and batch outputs the new content but ad_part.txt isn’t there anymore.

      Cheers
      Claudia

      1 Reply Last reply Reply Quote 1
      • N
        NotepadPlusUser
        last edited by Feb 12, 2016, 9:11 AM

        Thanks, Claudia. You’ve confirmed my experiments. The three possibilities are:

        • It’s a bug.
        • It’s intended.
        • There is a setting somewhere to prevent it, as there is in UEStudio, but neither you nor I can find it (and there is no proper Help file to search, which is often quite a problem with Notepad++).

        I haven’t posted here before. Is there someone who can give a clear answer about the situation?

        C 1 Reply Last reply Feb 12, 2016, 5:05 PM Reply Quote 0
        • C
          Claudia Frank @NotepadPlusUser
          last edited by Feb 12, 2016, 5:05 PM

          @NotepadPlusUser

          Don is the authority in this case. He’s checking the forum from time to time.
          What you could do is to open an issue at github.

          Cheers
          Claudia

          1 Reply Last reply Reply Quote 0
          • N
            NotepadPlusUser
            last edited by May 18, 2016, 12:41 AM

            This post has not been commented on, except by Claudia, who confirmed it. The issue remains with the latest version 6.9.2 released today.

            • Does anyone know how to preserve ADS files?
            • If it can’t be done at the moment, does anyone know whether the developers intend to provide such an option in the future?

            (I’ve added a similar post to the not on GitHub.)

            1 Reply Last reply Reply Quote 1
            • D
              dustinfineout
              last edited by Feb 23, 2018, 3:17 PM

              This should be considered a bug. I can open a file in Notepad++, make no changes and save it, and the file is fundamentally changed as any ADS will be deleted.

              1 Reply Last reply Reply Quote 0
              • G
                gstavi
                last edited by Feb 25, 2018, 1:34 PM

                Hardly anyone knows what alternate stream is. I had to Google it. It is no surprise that this does not get high priority.

                Out of curiosity, I maintain an npp version I build for myself with several patches.
                This patch fixes an issue I had were NPP reset permissions for files saved over SAMBA.
                There is a good chance that it will solve your problem as well. You can get the binary from here.

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