Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a way, using a URL, to launch a particular track in the iTunes player (on the local machine)?

I've noticed that URLs starting with "itunes://" launch the iTunes application, but cause it to look up an item in the iTunes Store.

However, I am not interested in the iTunes Store; I only want to the player to play a track in my local library.

share|improve this question
What operating system are you using? – Daniel Beck Mar 22 '11 at 6:00
I am using Windows, but I was hoping that the answer to the question would be OS-agnostic. – user14924 Mar 22 '11 at 23:16
up vote 0 down vote accepted

I moved my iTunes library around a bit, so I don't know the canonical path. Just adjust the URLs you see in this answer.

Configure Firefox to handle audio/mpeg using iTunes:

enter image description here

Then, open a URL in Firefox such as (on Mac OS X):


and it will play in iTunes. Since it's already in the library, it's not added again.

Using a browser like Firefox (not IE) has the benefit of being able to browse the file system if you want, and clicking on a file then opens in iTunes.

enter image description here

Similarly, in OS X Terminal, you can use the following:

open -a iTunes file:///Users/username/Music/iTunes/iTunes%20Music/Artist/Album/Title.mp3

It will use iTunes to open the URL, playing the file.

I don't have a Windows system with iTunes, it might work from Explorer if you use iTunes as default application for .mp3 files.

Via here, the following could work:

 rundll32.exe url.dll,FileProtocolHandler file://c:/wherever/iTunes/library/is/on/Windows/file.mp3
share|improve this answer

No. (Edit: After the comments below, I'm changing my answer to yes, you can. But not exactly the way I think you mean.)

The "itunes" function you mention is not intended to play music; it launches a web page inside the iTunes application.

To launch a local resource:

"The URL" of a track on your computer is the path to that song. A path looks like this:

C:\Users\goblinbox\Music\iTunes\iTunes Music\Bassnectar\Mesmerizing The Ultra

If you have iTunes set as your default music player, accessing the path to the song will launch iTunes and play the song.

You could, if you wanted, put that path into a web page, display it in a browser, and launch the song in iTunes on your local machine, but there's no advantage invoking web protocols when you already have access to the resource locally.

share|improve this answer
Even Wikipedia disagrees. – Daniel Beck Mar 22 '11 at 5:56
Well, sorta, yeah. Also: not exactly. - – goblinbox Mar 22 '11 at 6:02
It seems to be semantic, really, but if it's local, it's a path, and if it's hosted it's a URL or URI or something. The difference is the state of the box the resource is on. For instance, a path on my local machine is not universal, because you cannot reach it even if you know the full path. This is because my machine is a host, not a server, and not public. I think. – goblinbox Mar 22 '11 at 6:13
The U stands for Uniform, not Universal. If I'm in the same domain as a machine, http://machinename/path/ works (instead of and you would't argue it's not a URL there. File URLs are proper URLs. – Daniel Beck Mar 22 '11 at 6:16
All paths, regardless of protocol or the existence or not of a domain, are called URLs, then? Thanks! I didn't know that. (I thought certain protocols had to be involved else it was just a local path. Like in your example of a small domain you had to use http and a different naming convention.) – goblinbox Mar 22 '11 at 21:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .