I have a bunch extracted files that have a prefix that I want to remove (see examples). The prefixes are of different lengths so I cannot just script the removal of a specific number of characters. They all have the " - " just before the part of the file name that I would like to keep. There are also files that have no prefix. How do I go about scripting to delete all the characters up to and including the first " - ", but not doing anything to the files that have no prefix but may have a " - " in the name. I've looked at regular expressions thinking this may be the way to go (due to the ability to use patterns) but just don't grasp them, and I cannot find any other way of doing this.
DISRAD2-01 - Beautiful Soul - McCartney, Jesse (Want to delete "DISRAD2-01 - ")
CB5110-01-01 - Smoke On The Water - Deep Purple (Want to delete "CB5110-01-01 - ")
EKI54-09 - Script, The-For The First Time (Want to delete "EKI54-09 - ")
CB5110-01-06 - I Shot The Sheriff - Clapton, Eric
PR1443-05 - Dead Or Alive - You Spin Me Round
Thanx a bunch,
Biff
DISRAD2-01 - Beautiful Soul - McCartney, Jesse (Want to delete "DISRAD2-01 - ")
CB5110-01-01 - Smoke On The Water - Deep Purple (Want to delete "CB5110-01-01 - ")
EKI54-09 - Script, The-For The First Time (Want to delete "EKI54-09 - ")
CB5110-01-06 - I Shot The Sheriff - Clapton, Eric
PR1443-05 - Dead Or Alive - You Spin Me Round
Thanx a bunch,
Biff