Hello!
Anyone know where to find the path to the current user’s iTunes music library? Its not stored in com.apple.itunes.plist.
Thanks in advance
- fabian
Hello!
Anyone know where to find the path to the current user’s iTunes music library? Its not stored in com.apple.itunes.plist.
Thanks in advance
I’m trying to find the same thing. It’s not in the .plist file, not in the applescript library, and only seems ot be in the application.
It seems to be the one area thats lacking. I could parse the data out of the location of the current track, but then what if they don’t have the “Keep Library folder clean” option checked? Hmm.
The file ‘iTunes Music Library.xml’ should contain something like this:
<key>Music Folder</key><string>file://localhost/(some POSIX path)/</string>
But is iTunes Music Library.xml always in the same location?
I would think so. How else is iTunes supposed to find it?
What are you going to use this for anyways? As you mentioned, users may not keep their library folder clean. Actually, they may not even have all their music inside the library folder.
I’m using it for an iTunes X-Chat script I’ve written in Perl. It uses AppleScript via /applescript and osascript.
Hi,
You can get a reference to the current user’s Music folder with this:
path to “µdoc”
Then concatenate the folders:
set iTunes_lib to (“” & (path to “µdoc”) & “iTunes:” & “iTunes Music:”)
gl,
That would return the same thing as:
set iTunes_lib to (path to music folder from startup disk) & “iTunes:iTunes Music” as string as alias
?
Yes there are more ways to write this. The main thing is that the iTunes Library songs are in the Music folder. I saw the combined iTunes stuff right after I posted, but was too lazy to edit.
This line:
path to music folder from startup disk
Did they add this in Tiger? music folder doesn’t work for me here in Jaguar.
Thanks for the infos.
I think it was in either Tiger or Panther.