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

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

      Claudia FrankC 1 Reply Last reply Reply Quote 1
      • Claudia FrankC
        Claudia Frank @Вася Попов
        last edited by

        @Вася-Попов

        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

          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?

          Claudia FrankC 1 Reply Last reply Reply Quote 2
          • Claudia FrankC
            Claudia Frank @Вася Попов
            last edited by

            @Вася-Попов

            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
            • First post
              Last post
            The Community of users of the Notepad++ text editor.
            Powered by NodeBB | Contributors