iLounge Forums - View Single Post - App to Extract Embedded Cover Art
View Single Post
Old 06-04-2018, 02:32 AM

Join Date: Apr 2006
Location: Arizona
Posts: 9,213

Not that I know of, the scripts I have are very basic.

This is one for PC like Doug's but all it does is get the art from the selected tracks in your library.
And outputs them by song name and track number to C:\Windows\Temp

Save the text in the code block as GetArtwork.js
Open a command prompt where you saved the file.
Open iTunes
Select the tracks
In the command prompt type: wscript /nologo GetArtwork.js and press return.

You can use normal tools to see the size etc. The track number was there for songs with nearly duplicate names due to truncation.

You can change the output location to a different directory. This was one we should all have around.

var iTunesApp = WScript.CreateObject("iTunes.Application");
var mainLibrary = iTunesApp.LibraryPlaylist;
var tracks = iTunesApp.SelectedTracks;  //Remove leading slashes to only work on selected tracks, and comment out the next line.
//var tracks = mainLibrary.Tracks;  //Remove leading slashes to get all art from a library, and comment out the previous line.
var numTracks = tracks.Count;
var i;
var j;

for (i = 1; i <= numTracks; i++)
	var currTrack = tracks.Item(i);
	var artwork = currTrack.Artwork;

	for (j=1; j <=artwork.Count; j++) {
		var formatString ="";
		var currentArt = artwork.Item(j);
		var format = currentArt.Format;

		if (format == 1)
			formatString = ".jpg";
		else if (format == 2)
			formatString = ".png";
		else if (format == 0)
			formatString = ".bmp";

		if (formatString.length > 0) {
			var name = currTrack.Name.replace(/[#:?\\\/,\.\"\' ]+/g , "")+ currTrack.DiscNumber + "art_" + j;
			currentArt.SaveArtworkToFile("C:\\Windows\\Temp\\" + name + formatString);


Have you backed up your iTunes Library this week? If not, you are risking losing your music and playlists....
cjmnews is offline  
Reply With Quote