iPodFolderOpener

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.

About C.K. Sample III

I am a father, a husband, a blogger, a parrot owner, a pug owner, and the Chief Product Officer for YouEarnedIt. This site has no comments. If you want to talk to me, send me an @cksample on Twitter. If you like this post, feel free to buy me something off of my wishlist.
This entry was posted in iPod, OS X. Bookmark the permalink.

15 Responses to iPodFolderOpener

  1. Doug Adams says:

    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.

  2. C.K. says:

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

  3. Doug Adams says:

    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!

  4. C.K. says:

    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.

  5. NucleotideG4 says:

    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!

  6. NucleotideG4 says:

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

    Thanks.

  7. C.K. says:

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

  8. Brian says:

    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

  9. PARTNR says:

    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?

  10. Jeff says:

    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

  11. akiko32 says:

    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!

  12. c.k. says:

    Glad to be of help!

  13. nicolette says:

    you are awesome

  14. Thanks says:

    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

  15. m. says:

    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 are closed.