3rd Revision: iTunes Playlist to Clip (Mac/OS X) script

Maluze -

I hope this is not an iTunes version problem, as I have only tested my script with v7.6. However, based on your message, I am wondering if you have copied the script to the correct location. The correct location is:

/User/USERNAME/Library/iTunes/Scripts  (where USERNAME would be unique to your computer)

Under iTiunes 7.6, if you copy any script (extension .scpt) to this location, it will immediately be listed under the iTunes script icon, meaning you would not have to restart iTunes to have access to the script.

Use the Finder, Get Info, on the script where it currently resides on your computer. If the Where value does not match what I’ve given above, then that is likely the problem.

Please let me know what you find out.

Regarding, your last.fm and scrobble question, personally, not familar, but I might look into it once we get the script working for you. 

Hehe…I put it in the user/username/music/iTunes folder instead of the user/username/library/iTunes folder…how dumb of me. It works now.

I really wish songbird or iTunes could be made to work with the Clip in OS X…

We tried using your script on the Fuze, but have Itunes v. 8.  There is no script folder–just a plug ins folder, so we tried putting the file in there, but it did not show up in itunes.  The script worked to put a playlist on the Fuze, however, it was empty.  I tried opening the playlist file and manually putting in each mp3 file and then saving the file, however the playlist on the Fuze was still empty.  Any suggestions?

OK, here’s the deal.

My script has been written specifically for the Sansa Clip; I don’t own a Fuze. However, if the Fuze has the same file structure as the Clip, then you might be able to use my script with it.

To determine if it will work, you will need to take a look at the Fuze drive as it appears on your Mac Desktop. When you double-click the icon, look for a folder named, MUSIC (all caps), and for a file named, version.sdk.  If there is a folder named, MUSIC , and a file named, version.sdk and if songs are stored on the Fuze in the MUSIC folder in the same way as they are on the Clip, then you will problably be able to use my script.

Regarding your comment, “There is no script folder–just a plug ins folder”, here is the first step in my installations instructions (in the readme file provided with the download):   Create a subfolder named, Scripts, in your Users:UserName:Library:iTunes  folder. That should help you with the install of my script.

Good luck. 

Hi kwanzan,

Thanks very much indeed for your script - very helpful!  I’ve been using it on my fuze, and whilst it works fine in putting playlists onto the machine I’ve got a minor problem.  

Each time I put a playlist onto my fuze, it seems to get ghosted with an empty playlist beginning with ._ 

This isn’t a major problem, but I can’t find these ghostly playlists on the file tree to delete them (unless I delete the original list), so I seem to be amassing a list of ._ playlists…

Any ideas how to sort that out?

Apologies if this is incoherent - I’ve been playing around with this for ages, and my brain is going to mush.

riknorris -

I will try to help you with this issue, but my suggestions at this moment may be of limited value. I am out of town and do not have OSX conveniently available, so will be just giving you some “best” guesses. Also, I do not possess a Fuze and have never actually used one. I wrote my script for the Clip.

OK, enough conditionals…

I believe the ._ “ghosts” that are encumbering your playlist display, are a result of OSX creating a “resource” file associated with any file that it “creates” on the Fuze volume.

So, here’s the one idea I have for removal (which I cannot verify at this moment because I do not have access to OSX). You will need to use the Terminal under OSX.

In a Terminal window, you will need to navigate to the MUSIC directory of your Fuze. The command should be something like:       

                           cd   /Volumes/NAME OF YOUR FUZE/MUSIC

Once in the MUSIC directory, issue this command:

                            ls -lsa

This should give you a list of the files and folders in your MUSIC directory, including those that are “hidden”. In OSX, any file that has a name that begins with a period will be invisible under Finder,  hence the reason to use the Terminal.

If you have succeed in listing your file/folders, then you should see those unwanted ._playlistname files in the list.

Now, here is the guessing part. I know how to tell you how to remove those files. What I’m not 100% certain about, is whether they are important to the Fuze. So I suggest you try the removal of one such “ghost” file and then dismount/eject your Fuze from your Mac and take a look. If all is working normal, and your non-“ghost” playlist still works, then we have succeeded.

To remove the  unwanted file, use this command:

                          rm  ._playlistname


These “ghost” files may also be present on the Clip, but they are not visible in the Clip display. Again, since I do not currently have access to OSX, I cannot examine (ls -lsa) the Clip volume under Terminal.

That’s the best I can do at the moment. Let me know how it goes.

Thanks, kwanzan, for the great script. I was considering returning my Fuze because it’s not too Mac friendly, but your script made me change my mind.

I experienced the same problem as riknorris, with ._ ghost files for each actual playlist and mp3 file. I deleted these in Terminal using rm ._* in the appropriate directories. Everything works well now. One question though, is there any way to select a playlist and have it play automatically?

Thanks Kazwan!

The terminal solution hadn’t actually ocurred to me.  In the meantime I found another solution in another forum, which was to download mucommander , and use that to find and delete the hidden files.  

I’d never heard of it before (I’m pretty turd with computers), but it allows you to actually browse through the files which is handy. 

Incidentally, I was getting the same ._* ghost files for any track that I had ripped in itunes (which was quite a few)… 

Thanks again.

Thanks Kazwan - you just saved me a whole lot of trouble. Great little script!

Mandapandapop -

Your welcome. Always nice to get feedback, so thanks for taking the time to drop a note. 

Just signed up to say thank you Kazwan!  Your script has been a great help to me as I own both a Fuze and Clip - it works perfectly on both.  Good work!

jamiemutley -

Ditto my response to Mandapandapop, previous. Thanks for the feedback.


I was very happy when I found your script, but the playlist is shown empty on my Sansa Clip.

Could that be due to the fact that I have iTunes 9?

The script is nicely shown in iTunes and seems to work perfectly. The songs are copied and arranged in separate folders according to the artists.

But when I access the playlist on the Sansa Clip, it appears empty.

Any idea why?

I have read other comments in this thread and I have looked for hidden files, but didn’t find any.

braut2 -

Hmmm, I’m starting to get a bad feeling. Another person in a private email said the script “worked like a charm” but he received an error message during its execution. He too is running iTunes 9.

So, I (relucantly, I personally don’t want every new version of iTunes) installed iTunes 9 on a backup system, tested it and it worked as always.

However, you may have the difference the other individual had; he was running OSX 10.5.8, and I am running 10.4.11 (Tiger).

As I told the other individual, if you want to help me out here you can do two things. First, email the XML file created for the playlist that did not work. You can do this in iTunes with File:Library:Export Playlist and export as XML. You can also email the .m3u file created on the Clip.

I can analyze those files and try to discover a clue to the problem.

It’s up to you if you want to help me resolve the issue. Send the email to the address you find in the download Readme file.

I’m guessing Apple would like to make it harder and harder for any other device than the iPod to work with iTunes. Those devious, little, bas…

Good news, for those interested.

Apparently a bit of a false alarm from braut2; just an oversight in using the script.

Reports to me that it seems to be working fine, though a potential (very minor) bug was brought to my attention in the process of investigating the problem.

Which I plan to fix (and perhaps less than 1% of users will ever know the difference).

Thanks very much for this script. I downloaded and ran it with Mac OS 10.5.8 and iTunes 9 (following the “read me” instructions exactly) and it worked beautifully. Going out now to walk the 100 lb lab with my playlist. Thank you!

Message Edited by jcdb on 10-15-2009 03:14 PM

Can someone email me the script? The web site seems to be down. alansky at gmail.com  thank you!

kalansky -

Did not know about this! And, naturally not real happy with my domain server folks at the moment. Not likeI personally check this on a regular basis.

As I type they are “sending a screen capture” of the fun Internal Server Error msg you are seeing to some tech support person and are giving me a “ticket number”.

Hopefully they will resolve the problem quickly (they did some platform overhauls Oct 16. that I’m guessing have caused some spits and sputters here and there).

OK. I have my “ticket #”.  I’ll post here when I get the email from them that the problem has been resolved.

I would prefer that people download from my site, but if you can’t wait, then you can’t wait.

Glad that you posted here though, as I likely would not have discovered this problem on my own for some time.

Running on Snow Leapord, iTunes 9.0.1.

The latest script executes fine, but when I bring up the playlist in the clip it appears to be blank. Here is the first cut of the playlist it created:

Spencer Strand\Turn It Up Lay It Down vol.I\01 Seinfunk.mp3
Spencer Strand\Turn It Up Lay It Down vol.I\02 Gaddzooks.mp3
Spencer Strand\Turn It Up Lay It Down vol.I\03 Octifunkdisco.mp3
#EXTINF:167,Hard Workin’ JB Groove
Spencer Strand\Turn It Up Lay It Down vol.I\04 Hard Workin’ JB Groove.mp3
Spencer Strand\Turn It Up Lay It Down vol.I\05 Zepthing.mp3
Spencer Strand\Turn It Up Lay It Down vol.I\06 Rock’n.mp3

The directory paths look correct (if you assume MUSIC is the root). I have reset the Clip, but that did not help. Any ideas what I may have done wrong?

– bk

bkearney -

If the text you’ve shown is just a piece of the total M3U file (I noticed the last entry is not followed by path information), then your problem might be that you, for some reason, did not let the script put the M3U file in the default location, which is also the Clip MUSIC folder. That is where you should find it.

Otherwise email me direct (see the Readme with the download) and I will investigate further. You will need to email me both the M3U file created and the XML file you can get from iTunes for the playlist in question. Just go to File:Library:Export Playlist