View Full Version : Itunes Music Folder Location
laumusic
10-17-2003, 06:56 PM
Is there a way to script the changing of the 'iTunes Music Folder Location'.
I can't find a reference to it in the iTunes Applescript Dictionary.
I'd like to create a simple script to be able to point it to the local folder or an external drive on a server. The actual library file is unimportant.
Thanks,
Michael
bracken
10-17-2003, 10:50 PM
You could have the AppleScript run a shell script or run shell commands.
For example:
#!/bin/sh
mv ~/Library/Music/iTunes/iTunes\ Music /Volumes/FireWire
ln -s /Volumes/FireWire/iTunes\ Music ~/Library/Music/iTunes/iTunes\ Music
The iTunes Music folder is now on the "FireWire" drive but iTunes can't tell the difference. This saves you having to change the preference in iTunes. Symlinks (familiar to UNIX/Linux users) are more robust than Mac aliases and are safe to use.
If you need help with running a shell script or shell commands from AppleScript, no problem.
laumusic
10-18-2003, 10:41 PM
Bracken,
What exactly does this do?
I thought, with my limited knowledge of Unix, the mv means MOVE. Would it physically move the library folder or just resets some kind of internal preference that is easily accessable through UNIX.
Is the iTunes Music Folder Location Applescriptable like the Encoder type?
How would I go about making an Applescript to run the shell command.
Thanks,
Michael
Doug Adams
10-29-2003, 09:36 PM
I think the original poster wanted to set the location in iTunes' Advanced Preferences. This has to be done manually.
I have not tried a symlink or alias to the Music folder. I imagine this would work.
Doug Adams
10-30-2003, 09:23 AM
Setting your designated Music folder to an alias which points to your real Music folder will result in iTunes recognizing the real folder. It has to. That's how iTunes knows where newly added files will go. It's how the filepaths will be displayed in the xml file, and it's what is returned in a track's location AppleScript property.
In addition (regarding the original topic, some method to set the "iTunes Music folder location" in Advanced Preferences) GUI scripting can't touch iTunes Preferences either.