I recently have been moving a bunch of MP3s from various locations into a repository. I had been constructing the new file names using the ID3 tags (thanks, TagLib-Sharp!),
I'm using the System.IO.Path.GetInvalidFileNameChars() method to check invalid characters and I've got no problems.
System.IO.Path.GetInvalidFileNameChars()
I'm using the following code:
foreach( char invalidchar in System.IO.Path.GetInvalidFileNameChars()) { filename = filename.Replace(invalidchar, '_'); }