Community
    • Login

    multi search and replace in multi files with python

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    3 Posts 2 Posters 479 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.
    • Pouemes44P
      Pouemes44
      last edited by

      hello

      i have found a python script to do Multiple word search and replace.
      it seems to woth with python script plugin
      is it possible to use it with notepad++ in many files inside directories?
      how?
      a great thank

      PeterJonesP 1 Reply Last reply Reply Quote 0
      • PeterJonesP
        PeterJones @Pouemes44
        last edited by

        @pouemes44 ,

        Use a python for loop inside the script. you would do a for loop on all the files in the directory or directories, then for each one of those files, use notepad.open() to open that file, then do the main contents of your existing script, then notepad.save() and notepad.close().

        If you don’t know how to loop on all the files in a group of directories in Python, that’s a standard Python question which is not Notepad++-specific, so you can find help for that in standard Python documentation or help locations.

        1 Reply Last reply Reply Quote 1
        • Pouemes44P
          Pouemes44
          last edited by

          thanks will try to find

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