Community

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

    multi search and replace in multi files with python

    Help wanted · · · – – – · · ·
    2
    3
    163
    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.
    • Pouemes44
      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

      PeterJones 1 Reply Last reply Reply Quote 0
      • PeterJones
        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
        • Pouemes44
          Pouemes44 last edited by

          thanks will try to find

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