Код: Выделить всё
public void ChangeMetadata()
{
string artistName = ArtistNameTB.Text;
string destinationPath = DestinationPathTB.Text;
string albumName = AlbumNameTB.Text;
foreach (string file in FolderPathTab)
{
string fileName = Path.GetFileName(file);
string destinationFilePath = Path.Combine(destinationPath, fileName);
System.IO.File.Copy(file, destinationFilePath, true);
using (var tagLibFile = TagLib.File.Create(destinationFilePath))
{
if (!String.IsNullOrEmpty(ArtistNameTB.Text) || ArtistNameTB.Text != "")
{
tagLibFile.Tag.AlbumArtists = new[] { artistName };
}
tagLibFile.Tag.Album = albumName;
tagLibFile.Save();
}
}
Подробнее здесь: https://stackoverflow.com/questions/784 ... aglib-in-c