0

I need to remember the original setting of the iTunes Media Folder Location setting so I can restore its value after changing it (possibly) more than once.

What is the easiest way to accomplish this?

Mark Setchell
  • 191,897
  • 31
  • 273
  • 432
Bryan Dunphy
  • 799
  • 1
  • 10
  • 22
  • Give us a clue.... your question implies you know how to change it already so spill the beans and tell us the half of the story you know... – Mark Setchell Jan 08 '17 at 20:50
  • I use code that clicks each menu option "iTunes > Preferences > Advanced Tab > Change Button > Each directory in a path provided on the command line then the OK Button – Bryan Dunphy Jan 08 '17 at 20:57
  • The path is stored in `~/Library/Preferences/com.apple.iApps.plist` – vadian Jan 08 '17 at 21:03
  • vadian - Do you know the Key's name? It would make getting the value with Applescript much easier. – Bryan Dunphy Jan 08 '17 at 21:12
  • Can't you look it up yourself? Copy the path, goto Finder, press ⇧⌘G, press ⌘V, press Return, press Space. – vadian Jan 08 '17 at 21:16
  • It did not find it even after I shortened the search term to just the last element in the given path – Bryan Dunphy Jan 08 '17 at 21:35
  • Do **exactly** what I suggested in the last comment and you'll get a QuickLook of the file. – vadian Jan 08 '17 at 21:46
  • @vadian - I opened the plist in Xcode and had it do a find for "iTunes%20Music" and it found **NOTHING**. I then scanned the file myself and still couldn't find it, just a reference to the root directory "~/iTunes%20Store%20Only". – Bryan Dunphy Jan 08 '17 at 21:52
  • Maybe Apple changed that. In my `iApps.plist` file there are a file URL and a path to the iTunes library. In `com.apple.iTunes.plist` there is a key `alis:1:iTunes Library Location` with an NSData object representing the alias specifier to the iTunes folder. – vadian Jan 08 '17 at 22:03

1 Answers1

0

com.apple.iApps.plist is the correct place to look.

The key "iTunesRecentDatabasePaths" is a String Array, item 0 holds the most recent entry in a form relative to the User's Home directory. Meaning it will probably start with a ~ character.

The key "iTunesRecentDatabases" is a String Array, item 0 holds the most recent entry in the form of a fully qualified "File://" URL.

Bryan Dunphy
  • 799
  • 1
  • 10
  • 22