• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: One Finder and one iTunes Question?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


Philip Aker
echo email@hidden@nl | tr a-z@. p-za-o.@

 _______________________________________________
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

  • Follow-Ups:
    • Re: One Finder and one iTunes Question?
      • From: Skeeve <email@hidden>
References: 
 >One Finder and one iTunes Question? (From: Dave <email@hidden>)
 >Re: One Finder and one iTunes Question? (From: Skeeve <email@hidden>)

  • Prev by Date: Re: One Finder and one iTunes Question?
  • Next by Date: Setting signatures in Mail.app from osascript
  • Previous by thread: Re: One Finder and one iTunes Question?
  • Next by thread: Re: One Finder and one iTunes Question?
  • Index(es):
    • Date
    • Thread