Re: One Finder and one iTunes Question?
Re: One Finder and one iTunes Question?
- Subject: Re: One Finder and one iTunes Question?
- From: Philip Aker <email@hidden>
- Date: Tue, 08 Apr 2008 03:23:43 -0700
On 08-04-08, at 02:11, Skeeve wrote: How can I get the location of the music folder as set in the iTunes Preference panel?
I don't know, but you can use:
/usr/bin/defaults read com.apple.iApps iTunesRecentDatabases
to get the location of the Library xml file and check the locations of the files in there. I couldn't find any specific information, using defaults read, which tell me the location of the music folder.
The steps are:
1. Munge the array returned into a list of urls. Something like:
set dblist to paragraphs of (do shell script "/usr/bin/defaults read com.apple.iApps iTunesRecentDatabases | tr -d '(' | tr -d ')' | tr -d '\"' | tr -d ' ' ")
2. Translate the urls into POSIX file paths
3. cp each file path to an easy location like /tmp/db1.plist
4 Use 'defaults' to read the output files (in the form /tmp/db1)
5. Translate those urls into file paths.
Ugh! AppleScript needs some built-in URL encoding and coercion handlers. |
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden