<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>habdas.org &#187; music</title>
	<atom:link href="http://www.habdas.org/tag/music/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.habdas.org</link>
	<description>The technical blog of Josh Habdas</description>
	<lastBuildDate>Thu, 02 Sep 2010 02:06:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Relocate Missing Files in iTunes</title>
		<link>http://www.habdas.org/2008/12/15/itunes-fix-for-manually-moving-files/</link>
		<comments>http://www.habdas.org/2008/12/15/itunes-fix-for-manually-moving-files/#comments</comments>
		<pubDate>Tue, 16 Dec 2008 03:13:57 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
				<category><![CDATA[Data Management]]></category>
		<category><![CDATA[file management]]></category>
		<category><![CDATA[iTunes]]></category>
		<category><![CDATA[mp3]]></category>
		<category><![CDATA[mp4]]></category>
		<category><![CDATA[music]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://www.habdas.org/?p=128</guid>
		<description><![CDATA[iTunes users opting not to allow the program to automatically keep their folders organized (the default setting) may be well aware that iTunes does not respond well after changing locations of or renaming files. In fact, any change in the file name or path renders the item inaccessible from within iTunes. To make matters worse, there&#8217;s no [...]]]></description>
			<content:encoded><![CDATA[<p>iTunes users opting not to allow the program to automatically keep their folders organized (the default setting) may be well aware that iTunes does not respond well after changing locations of or renaming files. In fact, any change in the file name or path renders the item inaccessible from within iTunes. To make matters worse, there&#8217;s no easy way to have iTunes relocate files moved. iTunes prompts the user to relocate missing files but only one at a time with a dialog that says:</p>
<blockquote style="font-size: 1.2em;"><p>The song|movie &#8220;name&#8221; could not be used because the original file could not be found. Would you like to locate it?</p></blockquote>
<p>Not so useful when a lot of files are moved at once. But if a directory containing hundreds of files needs to be moved, to a larger hard drive for example, locating files individually becomes too much work.</p>
<p><span id="more-128"></span></p>
<p>Of course, there&#8217;s always the &#8220;fresh start&#8221; approach. Just delete everything and start over&#8230; A good idea if iTunes ratings, playlists and play counts are not considered important keepsake. But to users who spend a good deal of time carefully tweaking song ratings and organizing playlists, scrapping their information and starting fresh may not be a desirable approach.</p>
<p>Thankfully there&#8217;s an easy workaround for the problem. A sane alternative to relocating files one at a time (like when you move hundreds or thousands of files). The workaround straightforward and reversible. And useful whenever moving many files together.</p>
<p>Applying it will allow users to move files around in bulk, while still hanging onto most of the iTunes metadata they have likely grown fond of.</p>
<p><strong>Note:</strong>Some less significant meta information, such as <em>Last Played</em> time, is lost during the process. </p>
<h3>Addressing the problem</h3>
<p>Here are step-by-step instructions for updating the Library XML  and recreate the iTunes Library to enable file relocation when iTunes files are manually organized.</p>
<p><strong>Backup iTunes Music Library</strong></p>
<p>Before you move your files, do the following:</p>
<ol>
<li>Close iTunes for now.</li>
<li>Create copies of the following:
<ul>
<li>(2x) <strong>Library XML</strong> (iTunes Music Library.xml)</li>
<li>(1x) <strong>Library ITL</strong> (iTunes Library.itl)<br />
Vista users can find the Library XML at C:\Users\<strong>&lt;Username&gt;</strong>\Music\iTunes<br />
Mac users can find the Library XML at /Users/<strong>&lt;Username&gt;</strong>/Music/iTunes</li>
</ul>
</li>
</ol>
<p><strong>Relocate iTunes files as necessary</strong></p>
<p>Before moving files note the following two necessary pieces of information:</p>
<ol>
<li>The path where the files were previously stored (e.g. D:\Downloads\Music)</li>
<li>The path where the files will end up (e.g. E:\Music\Archive)</li>
</ol>
<p><strong>Hack the Library XML and delete the Library ITL</strong></p>
<p>After your files are moved, complete the following steps to implement the fix.<br />
<strong>Tip: </strong>Do not open iTunes during this process.</p>
<ol>
<li>Open one of the Library XML copies created.</li>
<li>Perform a Find/Replace using the following inputs:<br />
<strong>Find:</strong><em> </em>Path where files were moved from<br />
<strong>Replace:</strong> Path where files were moved to</li>
<li>Save and close the document, noting which file contains the modifications.</li>
<li>Delete the existing Library ITL.</li>
</ol>
<p><strong>Restart iTunes</strong></p>
<p>Once the Library ITL has been deleted, restart iTunes. The application will open with a blank library; custom playlists, music and other items will be gone. To recover the data do the following:</p>
<ol>
<li>Import the modified copy of the Library XML.<br />
In iTunes 8 and 9, choose<strong> File &gt; Library &gt; Import Playlist…</strong></li>
<li>Navigate to and <strong>Open</strong> the modified Library XML.</li>
<li>iTunes will then import the file contents into the blank library.</li>
<li>Wait for the import to complete.</li>
</ol>
<p>iTunes may display a dialog if any files cannot be located during the import process. The dialog can occur as a result of improper changes to the Library XML, or because the Library XML already contained references to files previously moved or renamed.</p>
<h3>Wrapping up</h3>
<p>Once the updated playlist is imported into iTunes lost songs and other media should be restored though there will be some duplicate playlists. Before deleting the extra playlists confirm the changes are working as expected. Once satisfied, delete the duplicates in the Library and enjoy your hard work. You&#8217;ve earned it.</p>
<p><strong>If something goes wrong</strong></p>
<p>If something goes wrong during the process, or if the results are not as expected, the original Library can be restored from the backup files created. To do so, close iTunes and copy the backup Library ITL and XML back to their original locations (overwrite existing files, if prompted) and restart iTunes to restore the previous Library.</p>
<p><strong>Additional resources</strong></p>
<p><a href="http://support.apple.com/kb/HT1451">Apple Support KB Article HT1451: How to re-create your iTunes library</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.habdas.org/2008/12/15/itunes-fix-for-manually-moving-files/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
