• 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?

  • @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)"


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

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


  • @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…)

  • 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

Log in to reply