Community
    • Login

    Launching Notepad++ from command line with -ro argument

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    2 Posts 2 Posters 2.6k Views 1 Watching
    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 PuatJ Offline
      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 ChuhM 1 Reply Last reply Reply Quote 0
      • Meta ChuhM Offline
        Meta Chuh moderator @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

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        • First post
          Last post
        The Community of users of the Notepad++ text editor.
        Powered by NodeBB | Contributors