Become a member of the iLounge Forums. Register Now!
To start viewing messages, select the forum that you want to visit from the selection below.
If this is your first visit, be sure to check out the Forum FAQ and Forum Policy.

Topic: Copying sort fields to main fields

Reply Thread Tools Topic Search
 
Old 04-07-2012, 12:29 PM
#1
 
Freshman Lounger
 
Join Date: Apr 2012
Posts: 3
Copying sort fields to main fields

I have numerous music files in my iTunes library that have 'unknown' artists and track names even though the 'sort name' and 'sort artist' fields have the correct names present.

Is there a way (using iTunes or a third party software) to copy the 'sort' fields across to the main fields in a batch process?

Thanks
KJJones is offline  
Reply With Quote

Join the iLounge Community and the ad above will disappear.

Old 04-07-2012, 12:31 PM
#2
 
Freshman Lounger
 
Join Date: Apr 2012
Posts: 3

Sorry - forgot to mention, I am a PC user.
KJJones is offline  
Reply With Quote
Old 04-07-2012, 01:54 PM
#3
 

 
Join Date: Apr 2006
Location: Arizona
Posts: 6,934
You are in luck

I have written a number of scripts to work out all sorts of little things like this.

Save the following code as SortToStandard.js
Code:
var iTunesApp = WScript.CreateObject("iTunes.Application");
var mainLibrary = iTunesApp.LibraryPlaylist;
var tracks = iTunesApp.SelectedTracks;
var numTracks = tracks.Count;
var i;
var sortArtist;
var sortName;

for (i = 1; i <= numTracks; i++)
{
  var currTrack = tracks.Item(i);
  sortName = currTrack.SortName;
  sortArtist = currTrack.SortArtist;
  currTrack.Name = sortName;
  currTrack.Artist = sortArtist;
}
WScript.Echo("Done");
Open iTunes.
Select the tracks in iTunes you want to update (or just a few if you want to test)

Open a command prompt where you saved the script.
Type: cscript SortToStandard.js

It will do just as you asked. If you need other fields you can see the pattern in the script. Make a new variable to get the current value, then update the current Track standard value with the one you got.

I tested this on a few tracks and it worked for me.



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
Old 04-07-2012, 05:29 PM
#4
 
Freshman Lounger
 
Join Date: Apr 2012
Posts: 3

Perfect! Thank you so much!
KJJones is offline  
Reply With Quote

Topic: Copying sort fields to main fields

Reply Thread Tools Topic Search

Become a member of the iLounge Forums. Register Now!
To start viewing messages, select the forum that you want to visit from the selection below.
If this is your first visit, be sure to check out the Forum FAQ and Forum Policy.
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sort By Artist in Album Mode (or another idea?) yanathin iPod touch 1 08-17-2008 10:47 PM
iPod Classic won't play certain songs dermot iPod classic & Legacy iPods 4 11-21-2007 01:47 PM
Jumping problem on IPod g8878035 iPod classic & Legacy iPods 0 04-16-2007 02:51 AM
2 laptops, 2 iPods, 1 main library? smartakus AppleScripts for iTunes (Mac) 2 04-29-2006 08:30 AM
Shuffle Songs from Main Menu - Apple Lies tgrocks iPod classic & Legacy iPods 2 08-17-2004 01:44 AM




View iLounge History. Read our old Forums Archive (2001-2003)
All times are GMT -4. The time now is 11:55 PM.


Shop for Accessories: Cases, speakers, chargers, etc.