Notepad++ BAT CMD Macros
-
Notepad++ BAT CMD How to use the my macros for all files in the folder, with a batch file?
-
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 -
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?
-
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 likefor each file in directory
run macro
save/close fileBut to be honest, I wouldn’t do it using npp instead using a scripting language like perl, python etc…
Cheers
Claudia