Replacing a colon with a dash
Posted: 16 Feb 2014, 18:32
I have FileBot set up to rename my movie folders and filenames correctly using the following expression:
However, I am running into a small problem when I have movies like this: Seal Team Six: The Raid on Osama Bin Laden
As you can see, there is a colon in the filename which is an illegal character. FileBot notifies me of this and replaces it with a valid character. I want to replace the colon with a dash though. From what I've read this is the way to do so:
This doesn't work though, and I'm not sure where to put it. I want to retain the uppercase format for the movie folder name. How do I strip the colon and replace with a dash?
Code: Select all
//Volumes/Movies/{n} ({y})/{n.upperInitial().space('.')}.{y}.{vf}.{vc}
As you can see, there is a colon in the filename which is an illegal character. FileBot notifies me of this and replaces it with a valid character. I want to replace the colon with a dash though. From what I've read this is the way to do so:
Code: Select all
.replaceAll(/[:|]/, " - ")