Community
    • Login

    THERE IS A PLUGIN THAT LOCK OPEN FILES?

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    6 Posts 3 Posters 4.3k 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.
    • Stefano FratoniS
      Stefano Fratoni
      last edited by

      I need to lock the file when opening with the notepad, so if you try to open the file with another editor the file is opened in read only.

      there is any plugin?

      Claudia FrankC 1 Reply Last reply Reply Quote 0
      • Claudia FrankC
        Claudia Frank @Stefano Fratoni
        last edited by

        @Stefano-Fratoni

        So I get that you do not want to lock a file but to set a read-only attribute, correct?
        Why not using run menu or NppExec and do something like

        cmd /C attrib +R  "$(FULL_CURRENT_PATH)"
        

        Cheers
        Claudia

        1 Reply Last reply Reply Quote 0
        • Scott SumnerS
          Scott Sumner
          last edited by dail

          @Claudia-Frank

          I’m guessing that @Stefano-Fratoni wants more functionality than that provides. If you run that cmd command, it also will prevent the current file from being changed by Notepad++ (icon on tab turns from blue to grey). I’m sensing that Stefano would like the file to be “locked” from other changes, but still wants it to be editable via Notepad++. Of course, just a suppostion…it sure would be nice if posters here would take their problem statements to a new level of detail.

          Claudia FrankC 1 Reply Last reply Reply Quote 1
          • Claudia FrankC
            Claudia Frank @Scott Sumner
            last edited by

            @Scott-Sumner

            But only if you have enable file status enabled.
            But you are right, we assume what wants to be done, maybe LockFileEx api is the right answer.

            Cheers
            Claudia

            Scott SumnerS 1 Reply Last reply Reply Quote 1
            • Scott SumnerS
              Scott Sumner @Claudia Frank
              last edited by

              @Claudia-Frank

              only if you have enable file status enabled

              When detail in the original posting is lacking, assume user is using Defaults! :-)

              Default: Settings (menu) -> Preferences -> MISC. -> File Status Auto-Detection: Enable 'd
              (I know you know this, Claudia; clarifying for the OP or other readers…)

              1 Reply Last reply Reply Quote 1
              • Stefano FratoniS
                Stefano Fratoni
                last edited by

                you fully understood the problem.

                this is a description of the problem:
                suppose I open a file (available on the net) with the notepad, another user who opens the same file but with another software (for example Ultraedit or Vim) must not be able to modify it.

                I hope I explained myself

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