Community

    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Launching Notepad++ from command line with -ro argument

    Help wanted · · · – – – · · ·
    2
    2
    1212
    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 Dy Chee Puat
      John Dy Chee Puat last edited by

      I can never get the -ro argument to work. Has anybody tried it?

      I usually open a bunch of files and then set them all as read only to prevent unintentional changes. I do this one tab at a time - too tedious. I would then clear the read only flag when I want to edit a specific file.

      Feature request: Settings->Preferences->Editing - open files in read only as default checkbox.

      Meta Chuh 1 Reply Last reply Reply Quote 1
      • Meta Chuh
        Meta Chuh @John Dy Chee Puat last edited by

        welcome to the notepad++ community, @John-Dy-Chee-Puat

        the -ro argument only works, if a file is not yet opened in a previous session.
        the session has a higher priority and the read only setting of a session overrides the -ro switch.

        if you want to open specific multiple files as read only, you can use the command line:
        notepad++.exe -ro -nosession change.log license.txt.
        note: this will disable session snapshot and periodic backup at the preferences, to try to avoid overwriting the previous session.xml.

        recommended: if you usually open more or less the same bunch of files as read only, you can open those files, set them as read only, and save this as a session at file > save session for future use.
        loading a saved session will set the saved read only status to the session’s state, regardless if the file is already opened in an opposite state.

        best regards.

        1 Reply Last reply Reply Quote 3
        • First post
          Last post
        Copyright © 2014 NodeBB Forums | Contributors