• Login
Community
  • Login

Notepad++ BAT CMD Macros

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
4 Posts 2 Posters 4.4k 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.
  • В
    Вася Попов
    last edited by Mar 13, 2018, 8:36 PM

    Notepad++ BAT CMD How to use the my macros for all files in the folder, with a batch file?

    C 1 Reply Last reply Mar 13, 2018, 8:42 PM Reply Quote 1
    • C
      Claudia Frank @Вася Попов
      last edited by Mar 13, 2018, 8:42 PM

      @Вася-Попов

      you mean macros recorded by npp?
      If so, afaik you can’t call it from a batch file easily as the recorded macros are basically
      messages send to windows handles/hwnds using SendMessage api (more or less).

      Cheers
      Claudia

      1 Reply Last reply Reply Quote 2
      • В
        Вася Попов
        last edited by Mar 13, 2018, 9:01 PM

        my macro consists of the following:
        “Flagging”
        in the field to find I enter: .msh|.scn|.dds|.mat|.wav|.ogg|.def|.edcs|.eds|.fkd|.fscr|.height|.ini|.lmap|.lmf|.map|.sdat|.skn|.track|.3da|.pfm|.fxm|.bak|.txt
        mark the found lines with a bookmark,
        I delete lines without a bookmark
        “Replace”
        in the field “find” I enter: [^\x20-\x7E]+|[\x3A-\x40]+|[\x21-\x2C]+ (sorting the ANSI file from not GEA8)
        “replace with” … (regular expression of line wrapping)
        I repeat the marking of lines, with a bookmark and then deleting the lines that do not contain the search words.
        And I save the file.

        I need to perform these actions for ~90,000 files, how can I do this automatically?

        C 1 Reply Last reply Mar 13, 2018, 9:14 PM Reply Quote 2
        • C
          Claudia Frank @Вася Попов
          last edited by Mar 13, 2018, 9:14 PM

          @Вася-Попов

          thought about it but don’t see that this can be achieved with npp builtin functions.
          By any chance, do you use some plugins like nppexec, python script or lua script?
          Then it might be possible to do things like

          for each file in directory
          run macro
          save/close file

          But to be honest, I wouldn’t do it using npp instead using a scripting language like perl, python etc…

          Cheers
          Claudia

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