how do make Action to add space between dashes?


#1

Hi

I'm wondering how to implement an Action which will modify the FILENAME of my mp3 files, and add spaces between dashes "-" in the filename (if the spaces are not already there).

Some example of what I'm wanting it to do:

  1. If there are no spaces around the dashes, they are added:
    ex) "artist-title" >Action> "artist - title"

  2. If there is space on only one side of the dash, the other space is added:
    ex) "artist- title" >Action> "artist - title"
    OR
    ex) "artist -title" >Action> "artist - title"

  3. If there is already space, do nothing
    ex) "artist - title" >Action does nothing because filename already meets the condition

I tried implementing a Replace action as follows:

Replace "_FILENAME": "-" -> " - "

But the problem with this is that it adds space around all dashes, so ALL my filenames just get extra spaces, not just the ones with no spaces around the dashes.


#2

You may replace the upcoming double spaces wth one space by a second replace run.

DD.20080926.1002.CEST