Hi all,
I’m in the process of getting my head around PowerShell. To learn, and to produce something I could make use of, I’m writing a script to take all of my mp3s and pop them into folders by the artist name… (they are named ‘artist - track’). This is relatively easy, split on ‘-’ and take the first string from the array. It will always be there as they all have ‘-’ in the name and with a little trimming, I have the folder name.
However, where im struggling is adding the ability to ignore anything in the artist name after ‘ft.’ or ‘vs’ etc. E.g. ‘Craig David ft. Eminem’ I would just want the folder as ‘Craig David’.
I’m not sure how to split on multiple strings without doing them one at time, and if i did that I’m not sure how to ensure there is a result. Any advice would be gratefully received.