First post. Have to at least start out by saying I've been a long time reader of these forums, and have had many
questions answered by the fine community that hangs out here. So before even getting to my question, thank you.
Moving right along, I have a folder of MP3 files containing various Movie sound tracks and scores. I'm using Audio Tag Tool to tag all the files at once with an "Artist" of "Soundtrack", and to inherit the "Title" tag from the file name. After that, I will rename all the files (Using Audio Tag Tool -- awesome program, btw) with the format "<Artist> - <Title>.mp3"
The problem, is many of my files already contain the string "Soundtrack", which would be redundant. I happen to be a perfectionist, so I'm unable to ignore it and move on. Hence my question to you fine folk:
I want to delete all instances of "soundtrack" (-i case irrelevant) in the filenames before
I go through the above steps. But, its not quite that simple.
This is a sample of some of the file names:
soundtrack - Yanni & Enya - Dances With Wolves.mp3
Troy Soundtrack - The Temple Of Poseidon.mp3
Tchaikovsky - 1812 Overture (V For Vendetta Soundtrack).mp3
If I simply renamed all files using sed with s/[sS]oundtrack//g, the files as above wouldn't be "neat". I would end up with:
- Yanni & Enya - Dances With Wolves.mp3
Troy - The Temple Of Poseidon.mp3
Tchaikovsky - 1812 Overture (V For Vendetta ).mp3
I'm hoping to avoid double spaces, and space beginnings, etc, to ensure general readability.
Hence the "advanced" string replacement.
I was trying to construct a method to delete "[sS]oundtrack" including any characters directly in front or before from the set: ()- :SPACE:
But I'm afraid this exceeds my linux knowledge.
Is anyone able to help? I will post the list of file names in the next post so you have data to work with. Thank you in advanced.