Help to add Spaces Before and After dash


#1

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

       or

A-Ha -Crying in the rain

to be same (need manual rename)

tks for any help !


#2

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

Filter:

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

DD.20120301.1618.CET


#3

thanks a lot !!!

working :music:

now,
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


#4

NOT %_filename% HAS "-"


#5

that was easy, tks dude !