id3 icon indicating copy to clipboard operation
id3 copied to clipboard

Q: How do I specifiy part of a the filename in the filespec?

Open DaveF63 opened this issue 2 years ago • 1 comments

Hi

id3 --delete --track "0%x" --title "%1_0%x" "*_*.mp3"

The above works as expected to ad part of the filename into the title tag.

How can I filter out some of the files in the folder, in this case those not starting with JOHN.

id3 --delete --track "0%x" --title "%1_0%x" "*_JOHN*.mp3"

I can find no clear example & I tried various combinations of escaping & brackets.

DaveF63 avatar Dec 27 '23 20:12 DaveF63

The only you thing you could use right now would be something like

id3 --delete --track "0%x" --title "%1_0%x" "*_[^J][^O][^H][^N]*.mp3"; 

That would skip the not-JOHN files, but that would strip off the first four characters of every file that does NOT have JOHN in that position. Basically you're running into the limitations of plain wildcards.

This would be more generally solved by a good solution to issue #27, e.g. suppose we could simply say

--filter "%1<>JOHN*"

So that's further motivation to add that.

squell avatar Jan 12 '24 11:01 squell