I think that this might be a basic question but wonder what is the easiest way to do it:
I have filename that is in format: 01 W.A.S.P. and I want to add a hypen JUST to replace this empty space.
So the right filename should be: 01 - W.A.S.P.
What is the easiest function to do this?
Use an Action "Replace"
or
Use the Convert Tag -> Tag for _FILENAME with $replace
Thank you for the fast answer.
Before adding my question here I did try to make it with the replace function.
The problem is that is adds the hypen then on every space and I do not know how to limit it only to the first instance. I have some kind of feeling that I have found that function ages ago.
To only replace the first space between the tracknumber and the title in the filename:
Convert Tag - Tag
Field: _FILENAME
Format string:
$regexp(%_FILENAME%,(\d+)\s(.*),$1 - $2)
Would convert
01 W.A.S.P. and other titles.mp3
to
01 - W.A.S.P. and other titles.mp3
Or with an Action "Replace with regular expression":
Field: _FILENAME
Regular expression:
(\d+)\s(.*)
Replace matches with:
$1 - $2
Please include this information in future questions, providing examples that demonstrate this requirement.
BTW:
Assuming that you have filled your fields already as mentioned here, you could also rebuild your filename with the content of your fields like this:
Convert Tag - Filename:
%track% - %title%
Thank you a lot and I will try with these methods!
The “convert Tag - Tag” hint worked like a charm and I will use this one in the future as well.