Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Regarding Consolidation & Recreation of my library...

Hello all !


After years of syncing my iTunes & iPhone + iPod with MS Outlook I recently started having various errors. iTunes would not sync my Outlook data to the iPhone, or would do so partly (sometimes only the contacts but not the calendar and the notes, some other times it would sync only the calendar but not the rest, etc).


Long story short, I initally thought the problem was my outlook .pst file, so I tried to fix it but this did not help. After hours and days of searching these topics I came to the conclusion that the problem is not my Outlook .pst file, but a corrupted iTunes library.


Now, let me point out that I have a rather big iTunes library. It points to 3 different hard discs. Two of them are SATA and the 3rd is an external (USB) one.


So I was thinking of buying a new SATA HD and moving / consolidating everything regarding my music / iTunes to that new HD.


So my question is: Does "consolidating my library" automatically recreates and fixes a corrupted library? Or should I first recreate my corrupted library by following this guide http://support.apple.com/kb/HT1451 and then proceed to consolidate that newly recreated library to my new HD ?


thank you in advance !

iPhone 4S, Windows 7, 4 GB RAM / iTunes / iPod Classic 120GB

Posted on Mar 7, 2014 10:43 AM

Reply
Question marked as Best reply

Posted on Mar 7, 2014 10:52 AM

Consolidating won't fix any internal errors in the database. Rebuilding the library with the media will lose ratings, play counts, playlists, date added values etc. Most of the data, with the exception of date added, can be backed up and restored into a new library if needed. Just be sure to back up the exitsting .itl and .xml files before trying to create a new library. Are you sure the library is really a problem? Are there other obvious issues apart from the syncing one? Double-checking also that you've uninstalled MobileMe... If not that could be part of the problem.


tt2

34 replies
Question marked as Best reply

Mar 7, 2014 10:52 AM in response to IoannisGR

Consolidating won't fix any internal errors in the database. Rebuilding the library with the media will lose ratings, play counts, playlists, date added values etc. Most of the data, with the exception of date added, can be backed up and restored into a new library if needed. Just be sure to back up the exitsting .itl and .xml files before trying to create a new library. Are you sure the library is really a problem? Are there other obvious issues apart from the syncing one? Double-checking also that you've uninstalled MobileMe... If not that could be part of the problem.


tt2

Mar 7, 2014 11:10 AM in response to turingtest2

Thank you for replying.


I got so many issues when trying to sync my iPhone lately that I don't even remember them now...


Here are some of them (and I got like all of them eventually !! ) :


"iTunes was unable to load data class information from Sync Services" error


Trouble syncing iphone to Itunes; gets stuck at syncing calendar


Itunes sync stuck on preparing to sync


Itunes stuck at "Finishing Sync"


Also, lately I had to Reset sync history (every single time) for the sync to start...


I have read the related topics and I came to the conclusion that the problem is my iTunes library (but you can never be 100% sure, right ? ).


So I abandoned Outlook and I managed to upload contacts, calendar and notes to iCloud. And that's fine for now.


But fixing my iTunes library is something I'm thinking of doing, especially if I decide to consolidate my library to a new HD



EDIT / UPDATE:


I just noticed what you said... "recreating my library will make me lose my playlists ?! That's a no-go for me ! I'm a radio producer and I have started creating these playlists a lot of years ago... so I don't have the luxury to lose them ! Any solution to that ?


Message was edited by: IoannisGR

Mar 7, 2014 11:36 AM in response to IoannisGR

If you've had sync issues following a recent update to iTunes you may want to try a clean install in the manner of Troubleshooting issues with iTunes for Windows updates. It may be the rest of the software rather than the library that lies at the heart of any issues you're having with syncing.


iTunes works best when all media connected to the library is stored in an iTunes Media folder which in turn is inside an iTunes folder that holds the library files. Keeping this layout allows the libray to be easily moved to another drive or computer without breaking the links to the media. It also makes it easier to back up to another drive and ensures that any folder-style backup is ready to go when needed. You may need to buy two drives, not one. 😉


If you want advice about the easiest way to rearrange things I'd need to know more about how much data is on the different disks, where the active iTunes Library.itl file is, and the current setting of the media folder in preferences.


tt2

Mar 7, 2014 12:07 PM in response to turingtest2

Thank you.


I will start by following the steps of the guide you gave me ( Troubleshooting issues with iTunes for Windows updates ) and will come back to you.


My goal is to make sure that both my iTunes software and library are in good shape before I consolidate the library to a new HD.



p.s.1: After spending days of trying to save and upload my contacts, calendar and notes to iCloud, I'm kind of hesitant to link iTunes to Outlook again, but I might try to and see what happens, after I follow the guide you posted.


p.s.2: I do have another USB external HD that I use for backups of my iTunes library (or the whole iTunes folder). Thing is that the last iTunes backup copy I had kept was too old, so I did not choose to restore it after the issues that showed up with my iTunes sync to Outlook.


Message was edited by: IoannisGR

Mar 8, 2014 1:47 AM in response to turingtest2

Hello again.

So I followed the guide and I reinstalled everything Apple related.

I had an issue when I installed again the iCloud control panel, messing my calendar on iCloud by creating -by mistake- a 2nd calendar and then merging both, with a result of having duplicate calendar entries in the end, but I somehow managed to disable icloud for calendar, synced with Outlook calendar and then enabled iCloud for calendar again, so my Cal is now OK.


Here is the structure of everything iTunes / Music at my PC


C:\Users\Echoes\Music\iTunes


User uploaded file


There is also:


C:\Users\Echoes\Music\iPod


which is empty.


Now, there is an external USB HD with this structure (most of my music linked to iTunes is in there):


K:\Music


User uploaded file


There is also a SATA HD F: with music linked to iTunes


F:\Music


User uploaded file


and this tree also contains music


F:\Special Files and Music


User uploaded file


Finally there is another SATA HD with music linked to iTunes


W:\Mind Radio


User uploaded file


That's it.


Now I'm thinking of buying a new SATA HD.

Because I do not seem to have space to connect the new HD via a SATA cable, I was thinking of using an external powered USB HD case. I would connect this new HD to my PC via USB, I would rename it / put the label: Music (M:) and create a folder "Music" inside it. So it would be like this:


M:\Music


Next step would be to try to Consolidate everything abovementioned music related (from all the other hard discs) to that location ! Then disconnect one of my previous SATA discs and connecting the new one via SATA cable...


How does this sound ?


Thank you in advance

Mar 8, 2014 2:46 AM in response to IoannisGR

I would suggest the following.



  1. Connect your new drive and assign the drive letter M: to it
  2. Create a new empty folder M:\iTunes
  3. With iTunes closed copy the following from C:\Users\Echos\Music\iTunes into M:\iTunes:Album ArtworkiTunes Library.itliTunes Library Extras.itdb
    iTunes Library Genius.itdbsentinel (hidden)
  4. Press and hold down shift as you launch iTunes and keep holding until prompted to choose or create a library. Click choose then browse to and open M:\iTunes\iTunes Library.itl
  5. Open the menu item Edit > Preferences > Advanced (press Alt or Ctrl+B to reveal the menu bar if needed) and, if necessary, change the media folder to M:\iTunes\iTumes Media - if you make a change iTunes will offer to consolidate files but say no at this point.
  6. Open File > Library > Organize Library... and tick both boxes if possible, or just Consolidate files if the other box is grayed out, then click OK.
  7. Wait until iTunes has finished copying everything over.



A couple of observations...


There are multiple .tmp files in your original iTunes folder. This is a sign that iTunes has crashed while saving the library, or that some other software has been locking up the temporary files that iTunes creates while updating the database. Sony VAIO's media content tool is a known culprit in this area, and both McAfee and AVG have, at times, been shown to cause problems for some people. I would recommend that you use the advanced settings of your AV package to exclude M:\iTunes from all real time scanning.


The list of steps given above assumes you are happy to let iTunes reorganize everything the way that it likes to, e.g. <Media Folder>\Music\<Artist>\<Album> for the music, file & folder names limited to 40 characters, etc. If you still want to reflect the subdivisions of the library as subfolders in your media folder or have a personal naming scheme for your tracks, that is potentially achievable, but requires additional effort to implement and maintain. For historical reasons (going back to an iRiver H140) my library has divisions for Classical, Comedy, Soundtracks, Various Artists and an Albums & Tracks folder with A-Z subfolders before you get down to the individual artist folders. I should have let iTunes take over years ago since I no longer use a folder based media player, but the 40 character limit in particular grates on me so I manage the structure using a custom script that moves things to where I want them and relinks iTunes to the moved files. I do not recommend this approach.


tt2


Mar 8, 2014 3:23 AM in response to turingtest2

Thank you so much for assisting me on this.


A couple of questions and observations


- If I follow the instructions you gave me, will the iTunes playlists I already have be preserved and stay intact ? Because I cannot lose the playlists !


- My AV app is ESET NOD 32. I will try to find a way to exclude M:\iTunes and everything else iTunes related from real time scanning.


- iSproggler might also cause issues with those temp files, right ? Should I remove it completely and forever?


- Like you, I no longer feel the need to maintain my (old) existent music folders structure. I prefer to let iTunes reorganize everything. But I am a little concerned with that 40 characters limitation. I mean what are the disadvantages of that limit ? Could you give me an example ?


- If I actually abandon my current folders structure and let iTunes reorganize everything, then how exactly am I going to be adding new music to my playlists / library ? Will it mean that I will manually be putting each new album or song by myself at the corresponding folders of the new iTunes structure and then drag and drop the songs to iTunes?



Mar 8, 2014 3:44 AM in response to IoannisGR

Updated:


- If I go on woth the above procedure and something goes wrong, will I be able to go back to my previous structure of library, folders, etc (by using a backup of the iTunes folder) ?


- I have several songs with ! and a lot of duplicates at my library. Would it be wise to clean the library from those now, or after the consolidation ?

Mar 8, 2014 4:55 AM in response to IoannisGR

Playlist membership, ratings and other metadata not stored in tags are preserved during the library relocation and media consolidation process I have given you. Those same pieces of data are lost when you manually remove, move and then reimport media which is why we want iTunes to handle the consolidation.



There are some recent threads covering issues with ESET NOD 32 and Outlook that it might be worth looking at. This search should throw them up for you to review.



Not familiar with iSproggler but any third party tool that attaches to iTunes has the potential to cause problems. Whenever iTunes is updated there is a possibilty that it no longer behaves exactly as expected by the other software. Might be best to remove it if it isn't serving a useful purpose.



iTunes will replace any characters that are not permitted in filenames \ / : * ? " | ; with the underscore character. A leading or trailing space or full stop are also converted. If a folder name or file name plus extension exceeds 40 characters then it is chopped short. If you access the media via an application like iTunes then the exact names of the files and folders really don't matter, but if, for example you have a copy of Friday Night In San Francisco by Al Di Meola, John McLaughlin & Paco De Lucía you'll find that iTunes stores it in a folder called Al Di Meola, John McLaughlin & Paco De L


It is more of an issue with long album and track names. The way iTunes access tracks also means that the entire path must not exceed 255 characters, which is probably behind the iTunes 40 character limit. An extreme example from my library is the Sufjan Stevens track:


The Black Hawk War, or, How to Demolish an Entire Civilization and Still Feel Good About Yourself in the Morning, or, We Apologize for the Inconvenience but You're Going to Have to Leave Now, or, 'I Have Fought the Big Knives and Will Continue to Fight Them Until They Are Off Our Lands!'


which comes in at 288 characters all by itself! My copy (226 chars) is at:


D:\iTunes\iTunes Media\Albums & Tracks\S\Sufjan Stevens\Illinoise\02 The Black Hawk War, or, How To Demolish An Entire Civilization & Still Feel Good About Yourself In The Morning, or, We Apologize For The Inconvenience....mp3


And if I let iTunes rename it then it would end up here for 94 chars:


D:\iTunes\iTunes Media\Music\Sufjan Stevens\Illinoise\02 The Black Hawk War, or, How To De.mp3




If you let iTunes take control (Edit > Preferences > Advance, tick both Keep... and Copy... options, after you've reorganized the library) then you don't need to do anything special. You can rip CDs, download from iTunes, drag and drop files into the iTunes application or the <Media Folder>\Automatically Add to iTunes folder, or use the File > Add Folder to Library menu. iTunes will take care of moving things to where they are supposed to be.




tt2



Mar 8, 2014 5:26 AM in response to IoannisGR

IoannisGR wrote:


Updated:


- If I go on woth the above procedure and something goes wrong, will I be able to go back to my previous structure of library, folders, etc (by using a backup of the iTunes folder) ?


- I have several songs with ! and a lot of duplicates at my library. Would it be wise to clean the library from those now, or after the consolidation ?


Step 3 makes a copy of your library files and leaves all the media where it is now. You can use the same technique as step 4 to switch back to the original library at C:\Users\Echoes\Music\iTunes\iTunes Library.itl if you need to. Step 6 will make copies of the media folder again making it possible to revert to the older library. Assuming all goes as it should wait until you're happy all is well with the new version library on M:, then back that up, before attempting to reclaim the space from the old media folders. Good practice to rename these and check for problems before deleting just to make sure they really are no longer in use.





One way to identify the broken links in your library is to create this set of playlists:


Lost & Found playlists

Create a playlist called Found, select everything in Music and drag it into the Found playlist. Create a smart playlist called Lost matching All the rules Playlist is Music and Playlist is not Found. Your lost tracks will be in this playlist.


However that method gets harder to use as the library grows in size. iTunes Folder Watch with its option to check for dead tracks on startup may be a better bet for removing the dead links, assuming that it won't be possible to repair them. If howvere you think some of the "dead" files might have been moved then my script FindTracks might be able to do repairs.




I had initially assumed that all your media in your media folders would be connected to the library, and everything in the library connected to a file. Since you have exclamations marks for missing tracks you might also want to think about making sure that there are no stragglers. Use Edit > Preferences > Advanced and make sure Copy to.. is unchecked, then use File > Add Folder to Library to add in each of your various media locations in turn. Only files that are not currently connected to the library will be added.



See this post regarding the duplicates.



Probably best to clean dead tracks and duplicates up before consolidating the library. Again make sure you are backed up before you start.




tt2

Mar 8, 2014 5:43 AM in response to turingtest2

Edit > Preferences > Advanced and make sure Copy to.. is unchecked. So we are ok with that.


Now, if I use File > Add Folder to Library and add all the locations, if I add a folder, will it also add by itself all the related subfolders of that folder ?


Also, if I do this, won't it create even more duplicates when an already linked folder is added again ?

Mar 8, 2014 5:53 AM in response to IoannisGR

IoannisGR wrote:


Edit > Preferences > Advanced and make sure Copy to.. is unchecked. So we are ok with that.


Now, if I use File > Add Folder to Library and add all the locations, if I add a folder, will it also add by itself all the related subfolders of that folder ?


Yes.


Also, if I do this, won't it create even more duplicates when an already linked folder is added again ?


No. iTunes will check each filepath against the existing contents of the library. If it already knows about that file it won't be added again. However if you have manually cleaned up some duplicates in the past while leaving the original files in those folders then it is possible some of the newly imported files could still be duplicates of tracks physically stored elsewhere in your various parallel media folders. The deduplication steps will clean those properly later.


tt2

Mar 9, 2014 11:17 AM in response to turingtest2

Hi again


I was thinking these last few hours that maybe letting iTunes reorganise my library would not actually be exactly how I would like my music structure to be. So I came up with two possible solutions (that would kind of keep my current structure) and I'd like to ask you kindly to tell me whether these solutions can be applied...


Let me say that my goal here is to have all my music in *one* new SATA internal HD. This way the access rate to my songs sill be faster, safer (I have never had any internal SATA HD crash, but I have seen two of my external USB HDs dying...), and of course this way, I will be able to easily maintain an image / backup copy of the whole HD for ...backup.


So these are the scenarios:


1) Buying a new big HD and creating folders that correspond to my current HDs structure (like: each folder on the new HD will be the image of each of my current HDs that hold my music):


- K/Music

- F/Music

- F/Music/Special Files and Music

- W/Mind Radio


and then copying my music there and finding a way to make iTunes library point to these folders.



2) Creating 3 partitions on this new HD


- K

- F

- W


with the same folder structure of my current HDs that hold my music and then making iTunes point to these partitions.


Of course, in both cases it would be even more welcomed (if possible) if I also transfered my whole iTunes folder to that new HD, too.



p.s. Even more, I would like -if possible- to remove the "======" characters from the folders naming structures that I have now, because I think they create problems when I try to back them up (errors regarding the "too long path of the songs" at the stage of copying to a backup HD)


Would you be kind enought to advice me and tell if any of these scenarios could be applied, and how ?


Thank you again !

Mar 9, 2014 2:59 PM in response to IoannisGR

Partitioning the drive will just create new problems.


I would strongly urge you to aim for a system where your library files are stored in <Drive>\iTunes and the media is in <Drive>\iTunes\iTunes Media\<Any subfolder scheme you like>. The advantage of this scheme is that the library, or a backup of it, will work whatever drive letter is assigned. Once you have media stored outside the media folder it must remain on the same path or iTunes will lose track of it.


Does iTunes already have playlists that know what exists in each of these (and any other meaningful) folders?

  • K:\Music
  • F:\Music
  • F:\Music\Special Files and Music
  • W:\Mind Radio


If not you can create some regular playlists to represent each of these subsets of your media then drag and drop the folders to them to populate the playlists.


Once these playlists are created you no longer need to reply on the physical layout of the media for this information, but if you still want to maintain the distinction within the new library then having created your new copy of the library files at M:\iTunes and connected to them you could, for example, set the media folder to M:\iTunes\iTunes Media\Mind Radio, then select all the tracks in the Mind Radio playlist, right-click on the selection and select Consolidate files. This would copy just this set of files to the new path, Repeat with other "special" folders. Once these have all been imported you could reset the media folder to the "standard" path of M:\iTunes\iTunes Media and consolidate from the File... menu to bring in all other media. As long as you leave the Keep... option disabled anything that is somewhere inside the main iTunes Media folder will be left alone.


When iTunes consolidates files into a media folder it uses the file <Media Folder>\.iTunes Preferences.plist to determine what internal layout to use. The old layout represented by the integer value 0, puts artists folders directly inside the media folder for music, while other media kinds get their own subfolders. The newer layout, integer value 1, puts music items in <Media Folder>\<Music>\<Artist> etc. If you're going to go down the more complex route I would suggest that after setting the media folder to, for example, M:\iTunes\iTunes Media\Mind Radio, you check the .Tunes Preferences.plist file inside it. If the value is not 0, change it, close iTunes and reopen before attempting to consolidate the files. The main iTunes Media folder should use the value 1 so that any mobile applications, iPod games and ringtones are stored in the same place, and to keep down the clutter in iTunes Media that would otherwise arise.



Some background on the layouts:


Here are typical layouts for the iTunes folders:


User uploaded file


If you have upgraded from version 8 (or earlier) to iTunes 9 (or later) at some point, then your media folder (everything inside the red outline) may still be called iTunes Music instead of iTunes Media. The extra Music folder inside the media folder is used if you have allowed iTunes to Upgrade to iTunes Media Organization (iTunes 9) or used File > Library > Organize Library > Reorganize files in the folder

"<Media Folder>" (iTunes 10). Depending on your choices for Keep iTunes Media folder organized and Copy files to iTunes Media folder when adding to library plus a little bug in which one build changed the name of the file storing the choice of layout it is quite easy for some of your files to be organized according to one layout and some the other.


Once everything has been copied into your new drive you may find my script ConsolidateByMoving useful in the future if you want to move things from one segment to another without losing ratings, play counts, playlist membership etc.


Because the playlists only exist inside iTunes you might also want to consider setting genre or grouping fields in some way for the "special" sections of your library so that if the worst came to it you could rebuild the playlists using rules like "Grouping is Mind Radio".


tt2

Regarding Consolidation & Recreation of my library...

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.