2010-01-24, 18:55
In order to get artwork for 400+ Artists in my library, I decided just to use an album cover from each artist. Then I can go back and manually tweak the ones that I'd like to have better images for.
So to do that, I wrote a quick VBScript which copies folder.jpg from the album folders up to the "parent" artist folder. This means your library has to be organized with album subfolders beneath artist folders, for example like so:
parent path\Beck\Mutations
parent path\Beck\Sea Change
...etc
The script is below... Windows tweakers may be able to make it more robust for their own needs... If you have this need, I hope it helps.
So to do that, I wrote a quick VBScript which copies folder.jpg from the album folders up to the "parent" artist folder. This means your library has to be organized with album subfolders beneath artist folders, for example like so:
parent path\Beck\Mutations
parent path\Beck\Sea Change
...etc
The script is below... Windows tweakers may be able to make it more robust for their own needs... If you have this need, I hope it helps.
Code:
' This script copies folder.jpg from an album folder to the parent artist folder
' no serious logic- attempts to copy every single one, and the last one found
' for each artist becomes that artist's folder.jpg.
'Your library folders must be organized as drive:\root folder\artist\album
'("root folder" is optional if your artist folders are visible in the root of the drive)
'Edit this path to point to the root folder of your library
' e.g. if your "Back in Black" album is here: f:\music\AC-DC\Back in Black"
' then your root folder would be: f:\music
sRootFolder = "F:\My Tunes Library\all music"
' No changes needed below this line -------------------------------------------------------------
Set oFSO = CreateObject("Scripting.FileSystemObject")
Set oRoot = oFSO.GetFolder(sRootFolder)
For Each oArtist in oRoot.SubFolders
For Each oAlbum in oArtist.SubFolders
For Each oFile in oAlbum.Files
If UCase(oFile.Name) = "FOLDER.JPG" Then
On Error Resume Next
oFSO.CopyFile oFile.Path, oArtist.Path + "\folder.jpg"
If Err.Number <> 0 Then
If vbNo = MsgBox("Error: " & Err.Number & " - " & Err.Description & vbCrLf & oFile.Path & vbCrLf & vbCrLf & "Continue?", vbYesNo) Then
MsgBox "Script terminated."
WScript.Quit()
End If
End If
On Error Goto 0
End If
Next
Next
Next
MsgBox "Script Complete!"