Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

Compare Properties of an MP3

$
0
0

Hello

I'm new to powershell, and I'm looking for an way to automate the following.

I have 2 folders with mp3s (Folder1: "C:\MP3WithComments") and (Folder2:"C:\MP3WithoutComments"). As you can probably tell one folder has MP3s with a unique string per track in the Comments field, while the second folder has MP3s without those comments in the tag. The same MP3s do not exist in both folders.

What I am trying to do is have a script compare files from Folder1 & Folder2. If it finds the same file in Folder2 that is in Folder1, compare the Comments property within the MP3 tag. If Folder1 has a longer string then replace the comment property in the file in Folder2 with the comment string from the file in Folder1.

I didn't think this was possible until I read Tobias' excellent post regarding the Taglib .Net library:

http://powershell.com/cs/blogs/tobias/archive/2011/02/07/reading-and-writing-mpeg-tags-and-attributes-part-2.aspx

 

What I'm getting stuck with is trying to use the Compare-Object cmdlet against the Comment property of each mp3. Any ideas on how to compare those properties?


Thanks

 


Viewing all articles
Browse latest Browse all 6937

Trending Articles