This is something I've always missed in KM and, unless I'm missing something, would love to have as an option.
I have a list of files and a list of name. I want to rename those files based on that list. So files:
file-sjjdk1.wav
file-aoijf.wav
file-244.wav
and a list of name
drums
bass
piano
so I want to cycle through each list and rename them and in the end I would have the files:
drums.wav
bass.wav
piano.wav
The For Each cycles through each file, but how can I say that on each loop it increases 1 line in the list? I know I can use indexes for lists separated with commas, but how about lines?
and it mentions custom delimiters, but for new lines, how does that work?
EDIT: Found it. I just need to add the regex /n for a new line. So if my variables is Local__list, then to target line #3 I would use: %Variable%Local__list[3]\n%
Yeah, I have some other old macros where I had to rely on additional actions to convert a list to an array using comma as delimiter (because I thought it was the only option), but now I can update them. Especially when the original line contains a comma as part of the "name" and so I would have to convert that comma into something else to avoid conflicts with the delimiter, then convert it back.
Always great to learn these things once in a while
This is a Token, not a regex -- but the non-printing character Tokens are a bit different to the ones you're used to (eg %ApplicationName%1%) in that they aren't enclosed in %s.