Spaces and Dashs

I'm struggling to find the information in this forum. I'm not coming up with what I need, or what I'm finding is not working when I try it.

In my "Title" and "Artist" fields, I have some entries which have one, or maybe two leading spaced before the information. How do I get rid of the spaces before the Title and Artist?

In the Filename, I have a similar problem with spaces at the end of the file. So a file such as TITLE - ARTIST.mp3 will actually be TITLE - ARTIST .mp3. How do I get rid of the space(s) before the .mp3 which are not necessary.

Finally, my Filename is suppose to be %Title" - %Artist%.mp3 but I have some files with the dash up against the Artist, sometimes the Title, and several will have two spaces between the dash and the Artist or Title. Is there any way to clean this up?

Frederick

Use the scripting function $trim() which will delete space before and after a the content of a tagfield.
I would not treat the filename directly but build a new filename with the corrected tagfields.

So define an action group with 3 actions:

  1. Action:
    Type: Format Value
    Field: ARTIST
    Format String: $trim(%artist%)

  2. Action:
    Type: Format Value
    Field: ARTIST
    Format String: $trim(%title%)

  3. Action:
    Type: Format Value
    Field: _FILENAME
    Format String: %title% - %artist%

https://help.mp3tag.de/options_format.html#format

In spite of the actions you could also use the different converters one after another which have a preview of the result of the format strings.

THANK YOU. That works perfectly, and cleaned up the databases.