Community
    • Login

    Notepad++ BAT CMD Macros

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    4 Posts 2 Posters 4.8k Views 2 Watching
    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.
    • Вася ПоповВ Offline
      Вася Попов
      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 Offline
        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
        • Вася ПоповВ Offline
          Вася Попов
          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 Offline
            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

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            • First post
              Last post
            The Community of users of the Notepad++ text editor.
            Powered by NodeBB | Contributors