Community
    • Login

    Run Notepad++ as commandline to edit and save

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    5 Posts 3 Posters 86 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.
    • Ian HicksI
      Ian Hicks
      last edited by

      I have a folder of XML files, created without Linefeeds.
      I want to run a script like

      Notepad++ abc.xml XML Tools>PrettyPrint
      Notepad++ bcd.xml XML Tools>PrettyPrint
      Notepad++ cde.xml XML Tools>PrettyPrint
      Notepad++ def.xml XML Tools>PrettyPrint
      Notepad++ efg.xml XML Tools>PrettyPrint
      

      so they are all readable

      Can I do this?

      PeterJonesP FreeMeowF 2 Replies Last reply Reply Quote 0
      • PeterJonesP
        PeterJones @Ian Hicks
        last edited by PeterJones

        @Ian-Hicks ,

        Not currently (from the command-line, anyway; see @FreeMeow’s reply, below, for an alternative).

        Notepad++ has the -pluginMessage command-line option, but XML Tools does not currently check that message; if the plugin author ever decided to add that feature, it would be technically feasible, but you would have to request that the plugin author implement that feature

        1 Reply Last reply Reply Quote 1
        • FreeMeowF
          FreeMeow @Ian Hicks
          last edited by FreeMeow

          @Ian-Hicks fc47d658-8027-4ae9-b603-6b884e5af15a-image.png
          You can open all the xml files with Notepad++, check “Apply to all open files” under XML Tools, and then do PrettyPrint and it will activate for all the open files.
          Afterwards your can disable it back, so you won’t accidently do it on all files needlessly.

          Ian HicksI 1 Reply Last reply Reply Quote 0
          • Ian HicksI
            Ian Hicks @FreeMeow
            last edited by

            @FreeMeow

            Thank you. You have improved the task, so it’s now just a few manual steps. A pity, as I was wanting to fully automate the extraction/processing path.

            1 Reply Last reply Reply Quote 0
            • Ian HicksI
              Ian Hicks
              last edited by

              Dang…
              You have now set me off on another problem.
              While I wanted to be able to fully automate the process, I am happy to be able to do this with a “few” keystrokes.

              SO, I should be able to:

              Notepad++ -nosession *.xml

              and manually update all the files with a single action?
              BUT:
              Since the files are in a number of sub-folders, how do I get it to load a list of files?
              It’s many more files/folders than this, but in essence:

              Notepad++ -nosession “abc.xml, .\folder1\bcd.xml, .\folder1\cde.xml”

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