iPodFolderOpener

by C.K. Sample III on 2/7/2005 · 15 comments

in OS X,iPod

NOTE: There are other products out there for easily copying your songs off of your iPod to your computer. If you're looking for a sophisticated program start looking here. iPodFolderOpener is a dumber version of these programs that I am busy coding for my own use. If you hate it and think it's stupid, don't use it. These scripts should work fine on any OS X computer, but I am not offering support for them. Feel free to hack away at them. This post will serve as the permanent page where I will update information regarding this software. Click here to download iPodFolderOpener 1.0 (38KB, zipped DMG file). Donationware: If you like these scripts and use them, visit my site (http://www.sampletheweb.com) and click on the PayPal button (underneath my picture in the sidebar) to make a donation of your choosing. History:
  • Version 1.0—Initial release: messily opens as Finder windows all the invisible folders inside the Music folder of a user's iPod / iPod mini / iPod Shuffle; February 7th, 2005.


What it is: iPodFolderOpener is an AppleScript standalone app that can be placed anywhere (I recommend your Applications folder) or script (which should be placed in either /Library/Scripts/ or ~/Library/Scripts/).

What it does: iPodFolderOpener opens Finder windows of some or all (per your choosing) of the invisible folders containing music on your iPod, iPod mini, or iPod Shuffle. Once they are open, you can easily drag and drop the files to other locations on your computer and / or add them to your iTunes Library.

How to use it: First, make sure that your iPod is plugged into your Mac and mounted as a hard drive in the Finder. Then, simply click on iPodFolderOpener to launch it (or if you have placed the script in the Scripts folder, simply use your script menu in the menu bar to access iPodFolderOpener). A dialog box will open asking you for the name of the iPod / iPod Shuffle / iPod mini from which you want to remove songs. If your iPod's name contains any special characters, like ' or " you should probably change it first. Spaces are okay, but if your iPod's name is "My iPod" you will need to enter a backslash before the space: "My iPod". After you enter your iPod's name, click "Okay" and another dialog box will open with three buttons: Cancel, ALL, and PICK. If you click ALL then all of the invisible folders inside your Music folder will open. If you have an almost full 40GB iPod, this will be a lot of folders, so considered yourself warned (and remember, you can always go to Finder-->File and hold down the Option key to change the Close Window function to Close All Windows). If you click on PICK another dialog will open where you must enter the name of the folder you want to open. You can do this to browse through your iPod's music a folder at a time. The folders begin with folder F00, then continue on to F01, F02, F03, etc. If you put in a folder name that doesn't exist, the script will end in an error.

Why did you write this script?: For fame and fortune, of course. ;-) Actually, I wanted an easy way to Autofill my new iPod Shuffle from my 40GB iPod (as I tend to keep my music on my iPod, but not on my laptop's internal harddrive). iPodFolderOpener simply automates some work that you can do via the Terminal, which is the first step in accomplishing this. I am currently working on a variant of the script which will actually automate the entire process.

THE SOURCE CODE:
--iPod Opener --Open this script in a new Script Editor window. property your_iPod_name : missing value property userchoice : "All" --set the iPod name once: set your_iPod_name to text returned of (display dialog "Enter your iPod's name:" & return & "(If your iPod's name has any spaces in it, enter a backslash before the space)" default answer "" buttons {"Cancel", "OK"} default button 2 with icon 1) --open some or all folders inside Music: set userchoice to button returned of (display dialog "What do you want to do?" buttons {"Cancel", "ALL", "PICK"} default button userchoice with icon 1) if userchoice = "ALL" then set theNumber to "F**" else set theNumber to text returned of (display dialog "Enter a random folder name:" & return & "(i.e., F00, F01, F02, etc.)" & return & "If nothing happens, then there is no such folder." default answer "" buttons {"Cancel", "OK"} default button 2 with icon 1) end if do shell script "open /Volumes/" & your_iPod_name & "/iPod_Control/Music/" & theNumber & "/" display dialog "Done!" buttons {"Okay! Thanks!"}
Listed on Versiontracker, Macscripter, and Sofotex.

Related posts:

  1. How to Autofill your iPod Shuffle from your iPod Or iPod Mini
  2. iPodFolderOpener back online…
  3. Autofill from iPod


Advertisements:


{ 15 comments }

Doug Adams 2/9/2005 at 3:14 pm

Hey C.K….nice work. For laffs I let iTunes set the name of the iPod, like so:

–set the iPod name once:

tell application “iTunes”
try
set your_iPod_name to (name of some source whose kind is iPod)
on error
set your_iPod_name to text returned of (display dialog “Enter your iPod’s name:” default answer “” buttons {“Cancel”, “OK”} default button 2 with icon 1)
end try
end tell

and added the quoted form of to your do shell script routine:

do shell script “open /Volumes/” & (quoted form of your_iPod_name) & “/iPod_Control/Music/” & theNumber & “/”

which will account for spaces, among other characters.

C.K. 2/9/2005 at 3:21 pm

You, sir, are a much less lazy man than I. Nice.

Doug Adams 2/9/2005 at 5:54 pm

OK, another one. This one opens a choose box so you can select from available “F” folders for “PICK”:
--iPod Opener
property your_iPod_name : missing value
property userchoice : "All"

--set the iPod name once:
tell application "iTunes"
try
set your_iPod_name to (name of some source whose kind is iPod)
on error
set your_iPod_name to text returned of (display dialog "Enter your iPod's name:" default answer "" buttons {"Cancel", "OK"} default button 2 with icon 1)
end try
end tell

--open some or all folders inside Music:
set userchoice to button returned of (display dialog "What do you want to do?" buttons {"Cancel", "ALL", "PICK"} default button userchoice with icon 1)
if userchoice = "ALL" then
set theNumber to "F**"
else if userchoice = "PICK" then
set fs to (do shell script "ls /Volumes/" & (quoted form of your_iPod_name) & "/iPod_Control/Music/")
set fs to my text_to_list(fs, return)

set my_choice to (choose from list fs with prompt "Select the Folders you wish to open..." with multiple selections allowed without empty selection allowed)
if my_choice is false then return

repeat with a_choice in my_choice
do shell script "open /Volumes/" & (quoted form of your_iPod_name) & "/iPod_Control/Music/" & a_choice & "/"
end repeat
else
do shell script "open /Volumes/" & (quoted form of your_iPod_name) & "/iPod_Control/Music/" & theNumber & "/"
end if

display dialog "Done!" buttons {"Okay! Thanks!"} default button 1 giving up after 15

on text_to_list(txt, delim)
set saveD to AppleScript's text item delimiters
try
set AppleScript's text item delimiters to {delim}
set theList to every text item of txt
on error errStr number errNum
set AppleScript's text item delimiters to saveD
error errStr number errNum
end try
set AppleScript's text item delimiters to saveD
return (theList)
end text_to_list

Cheers!

C.K. 2/9/2005 at 9:32 pm

Cool. I thought about attempting to implement something like what you’ve done here, but didn’t really know how to go about doing it without doing some more digging into strings. Again, me = lazy. Coolness.

NucleotideG4 2/16/2005 at 3:42 pm

I am curious to see if this helps me move playlists back and forth from the iPod. This is something that has annoyed me quite a bit!

NucleotideG4 2/16/2005 at 4:06 pm

I can’t find them… send me a note or email at SpyMac if you have any helpful advice!

Thanks.

C.K. 2/16/2005 at 4:09 pm

The playlists should be inside /iPod_Control/iTunes/iTunesPlaylists/

Brian 3/12/2005 at 2:58 am

Just thought I would let you know that I could not get your script to handle a folders name written in Japanese. Easy to correct I just have to name my iPod in a English name, but….thought it interesting.

Brian

PARTNR 7/10/2005 at 7:10 pm

Very cool. Thank you. Pardon my ignorance here…Is there a way around the naming convention – everything came up with something like CNEZ.m4p

Is there any way to see what the real name is besides playing it and renaming?

Jeff 5/26/2006 at 11:00 am

Hey, What about us pc people?
Could you email me with pc instructions to prevent the loss of my tunes on a sync with itunes?
Thanks
A new Ipod 60G owner

akiko32 12/7/2006 at 8:29 am

mate, thank you!

Perfect.

Old ipod (synced to other mac)

New ipod (synced to newer ibbok)

= problems.

But your script & 10 minutes solved it all.

thank you!

c.k. 12/7/2006 at 9:46 am

Glad to be of help!

nicolette 6/7/2007 at 7:52 am

you are awesome

Thanks 9/17/2007 at 3:12 am

THANK YOU!!!! I HAVE A MACBOOK AND COULD NOT FIGURE OUT HOW TO TRANSFER MY OLD IPOD TO IT.

YOU SAVED HOURS AND HOURS OF MUSIC!

MUAH XOXOXOX

m. 5/16/2009 at 5:26 pm

ok so i backed up all my music from my old i pod to my computer by doing this but now i dont know how to get it onto my new ipod, help!!!!

Comments on this entry are closed.

Previous post:

Next post:

Note: If you are an iPhone application developer and you would like me to review your app, please see this post. If you liked this post, consider subscribing to my feed in the RSS reader of your choosing, following me on Twitter, or subscribing to my YouTube channel.
My Artwork for sale on Etsy