Help to add Spaces Before and After dash

hello guys !

need help to add spaces before and after dash, only if is one dash in filename:

Berlin-You dont know.mp3

           to be

Berlin - You dont know.mp3

but if are 2 or more dashes in the filename, do not change the file name:

Connells- 74-75


A-Ha -Crying in the rain

to be same (need manual rename)

tks for any help !

Action: Format value
Format string: $regexp(%_filename%,'^([^-]+?)(-)([^-]+?)$','$1 $2 $3')


"%_filename%" MATCHES "^([^-]+?)(-)([^-]+?)$"


thanks a lot !!!

working :music:

can you help me with a filter to hide filenames with dashes, like:

Connells- 74-75
A-Ha -Crying in the rain
Berlin - You dont know.mp3

and show only files like:

[01] be happy.flac
La donna e mobile.mp3

NOT %_filename% HAS "-"

that was easy, tks dude !