Folder Action on iTunes CD Import

I want a folder action to run when iTunes imports a CD or downloads a track - basically whenever something is added to the iTunes Music folder.
The script runs fine when I drop something in the folder using Finder, but doesn't run when iTunes adds something. Is there anything I should look for?
Thanks

I have written a music server program that allows iTunes to be controlled from third-party control systems via a network connection. Typically, my users store their music on a central machine that plays music throughout their house. But when they purchase music, they have to manually move the music from one machine to another, a process that generates lots of service calls for me.
I'm trying to simplify the copying of music from one machine to another. I'm also toying with a smart playlist that contains recently added stuff. I can set up a script that the user can run after loading new music to copy the recently added stuff across, but I was hoping there would be a more automatic way to do it.

Similar Messages

  • ITunes 10.5 breaks automator folder action

    Just like itunes10 did
    osx 10.6.8
    itunes 10.5
    automator folder action with itunes tasks no longer works after 10.5 update.
    Is it the version check again?

    Unfortunately, it seems that this is a cross-platform problem between iTunes 10.5 and all NAS disks. Shared libraries on network drives worked fine under 10.4.1, but now there is just an endless loading cycle with no error message or time-out. There is a bit more about it in this thread.
    Martin

  • I just installed iTunes on my computer, where I already have all my music. I went to Edit Preferences Advanced, and changed the iTunes Media Folder Location to where I have all my music, in the "Local Disk." But iTunes wont import all my music. Help?

    I just installed iTunes on my computer, where I already have all my music. I went to Edit > Preferences > Advanced, and changed the iTunes Media Folder Location to where I have all my music, in the "Local Disk." But iTunes wont import all my music. Help?

    Have you looked in the Music App on your iPhone? On the iPhone music is played by the Music App not iTunes.

  • HT4527 I am trying to transfer music files from one PC to another using homeshare and although I can view the music as a shared folder I cannot initiate the "import" process.  I have iTunes 11.0.1.12 on both computers so the help screenshots do not help a

    I am trying to transfer music files from one PC to another using homeshare and although I can view the music as a shared folder I cannot initiate the "import" process.  I have iTunes 11.0.1.12 on both computers so the help screenshots do not help as such

    Then stop trying to use HomeShare and use one of the other options listed in the document from which your question was posted.

  • Need a Folder Action Script to automate running of Applescripts in iTunes

    I posted this in the OSX forum but thought i'd try here too:
    I have a couple of applescripts that I have begun using on some of my podcasts. Specifically they will deselect "Skip When Shuffling" and "Remember Track Position" (Thanks Doug!). I feel like it is getting tedious to have to remember to run these scripts every time the Podcast updates a new episode. I'm looking for a folder action script that will run these applescripts whenever a new item is added to their folder. While I try to puzzle one together (having never written one) does anyone have anything to fit these needs?

    Yes.
    I recently need one to do something else.
    I'll just give you the script I am using, you can hack at will...
    property TargetPlaylist : "Library"
    on adding folder items to this_folder after receiving added_items
    repeat with each_item in added_items
    tell application "iTunes"
    add each_item to playlist TargetPlaylist
    end tell
    end repeat
    tell application "Finder"
    move every item of this_folder to the trash
    empty the trash
    end tell
    end adding folder items to
    This script when attached as a folder action will add the items dropped into it to my iTunes library, then delete them.
    You can easily tear this one apart to get what you need done.
    Beavis2084

  • How to import a complex mp3  folder strucutr in itunes and automated create playlists namend after this folders?

    Hi to all,
    I have a Problem. I organised since years my mp3 music in folders with subfolders and so on. I didnt create any playlists. Now i want to use itunes and ipod/ipone. How can i import a the complex mp3  folder strucutr in itunes and automated create playlists namend after this folders?
    I understood how to import the music in the media library but i dont want to creat hundreds of playlists by hand.
    Maybe someone has a tip?
    Thank to all
    Andy

    iTunes doesn't take any notice of your folder structure or provide any automatic way to use any information that might be coded in the path. Can you describe the current layout in a bit more detail and explain what you hope to achieve. It may be possible to use tools in other program's such as MediaMonkey or custom scripts to get the data from the file paths into something that iTunes can work with. The most important thing at this stage is not to import media to iTunes without first making sure under Edit > Preferences > Advanced that Keep iTunes Media folder organized and Copy to iTunes Media folder when adding to library are turned off otherwise iTunes may destroy your existing structure.
    tt2

  • Help with iTunes & Finder Folder Action

    My iTunes library has both a TON of albums and a TON of one-off mp3s such as remixes or singles. I'm trying to figure out a way to make two smart playlists and need help.
    Playlist One is a smart playlist of 250 of the most recently added one-off tracks, compiled by looking for #single in my .mp3 comment fields.
    Playlist Two is a smart playlist of the 25 last ALBUMS I added to iTunes, compiled by looking for #album in my .mp3 comment fields.
    For Playlist One I'd like to use Automator and make a folder action to:
    - Watch my 'Downloads' folder for downloaded .mp3 files.
    - Add those .mp3 files to iTunes, letting iTunes copy to music folder.
    - Delete the original file from the 'Downloads' folder.
    - In iTunes, add '#single' to the Comment field of added .mp3.
    For Playlist Two I'd like to use Automator and make a folder action to:
    - Watch my 'Downloads' folder for downloaded .rar and .zip files.
    - Open/Unzip those .rar and .zip files.
    - Then look for SUBFOLDERS containing .mp3 files in my 'Downloads' folder.
    - Add those .mp3 files to iTunes, letting iTunes copy to music folder.
    - Delete the folder from the 'Downloads' folder.
    - In iTunes, add '#album' to the Comment field of added .mp3.
    Can anyone help me with this? Please?

    Better yet, an Applescript that can be used as a folder action to watch the Downloads folder and:
    1) Open .mp3s in iTunes and append #single to track Comments, then delete original .mp3s.
    2) Open .zip and .rar archives, parse then unarchived folder for .mp3 files, add them to iTunes, append #album to track Comments, then delete original folder of .mp3s.
    2a) Bonus points if the script adds the .mp3s to itunes in descending order based on file name track numbers (track 10, track 9, track 8...).

  • Copy a folder (that contains mp3s) then import said songs into iTunes?

    I have made an automator-created folder action that will, when a folder, which contains an album of MP3s, is dropped into a certain folder, the folder of songs will be copied into another folder and then I want those songs to be added to iTunes.
    The action works fine for copying, but it won't add the songs to iTunes. My workflow is as follows, though I've tried different things to try and add the songs:
    1) Copy finder items to folder "To Sort"
    2) Get folder contents.
    3) Add songs to playlist "Library"
    Can anyone help me out on this?
    Thanks!
    -Tristan

    TristanG
    I believe you need to use the "Add Files to Playlist" instead of the "Add Songs to Playlist". The latter command is used when the songs are already in iTunes.

  • Can't import folder / files into iTunes

    I am trying to import a folder into my iTunes library. I use the File> Add Folder to Library option, navigate to and select the folder, and no songs are added to the library. The song files are .m4a format.
    I am a pretty new iTunes/iPod user. If I could figure out how to search on this forum, someone else probably has already asked this qeustion, but it is not obvious to me how to search.
    Thanks for any help.
    Steve Johnson
    Carmel, In

    How many files are in the folder? Can you add just one of the files using Add File to library?

  • Folder Actions script no longer runs on new file creation

    Hope this isn't trivial.......first time posting here...hopefully in the right place.I'm not a total Mac OS X newbie...and surely no techie, either. Dabbled a wee bit with Automator and scratchin' my head on this one. Help, please!
    Any idea why folder actions not running when a new file is saved? A simple add-color-label script created in Automator was workin' fine before I did a Snow Leopard-to-Leopard downgrade clean-install & account migration from external HD (TimeMachine) backup. Folder actions are enabled and script runs only if I start it with Automator Runner. Previously, it would label the file as soon as I saved it....now it needs a manual start. Is this default behavior in Leopard? Or am I missing something or doin' something wrong? Or is this a consequence of downgrade? I was sure I had the same script workin ok in my original Leopard install - though possibly un-modified at that time.
    I have no clue why, but the new version I created recently (cpl wks ago?)worked the first time I added a new file but not thereafter...and in that instance it only labelled the file in Finder upon quitting Preview (file is a Grab saved as pdf).
    The reason for the downgrade was compatibility problems with Photoshop CS4 on SL (OS & app all updated yet crashin' at the drop of a hat) - maybe due to lack of RAM? (only 1GB). Saw quite a few posts regarding SL running CS4 problems, so now I'm back to running 10.5.8 ..again.. and PS actually runs smooth like it did before.
    Maybe these console messages are a help......or am I barkin' up the wrong tree?
    6/11/11 7:44:54 PM /System/Library/CoreServices/Folder Actions Dispatcher.app/Contents/MacOS/Folder Actions Dispatcher[91] CPSGetProcessInfo(): This call is deprecated and should not be called anymore.
    6/11/11 7:44:54 PM /System/Library/CoreServices/Folder Actions Dispatcher.app/Contents/MacOS/Folder Actions Dispatcher[91] CPSPBGetProcessInfo(): This call is deprecated and should not be called anymore.
    6/11/11 7:44:54 PM /System/Library/CoreServices/AppleScript Runner.app/Contents/MacOS/AppleScript Runner[264] CPSGetFrontProcess(): This call is deprecated and should not be called anymore. 
    6/11/11 8:19:12 PM Automator Runner[415] Error while processing arguments
    6/11/11 8:20:31 PM /Applications/AppleScript/Folder Actions Setup.app/Contents/MacOS/Folder Actions Setup[420] CPSGetProcessInfo(): This call is deprecated and should not be called anymore.
    6/11/11 8:20:31 PM /Applications/AppleScript/Folder Actions Setup.app/Contents/MacOS/Folder Actions Setup[420] CPSPBGetProcessInfo(): This call is deprecated and should not be called anymore.
    6/11/11 8:20:32 PM [0x0-0x5b05b].com.apple.systemevents[421] com.apple.FolderActions.enabled: Already loaded
    And for that matter....why does Automator throw these messages? All apps (except iWork '08 apps) and OS are up to date.
        - Just a few of the many actions not loaded:
    6/11/11 7:48:25 PM Automator[294] The action “Start iTunes Visuals” could not be loaded because the application “iTunes” is the wrong version.
    6/11/11 7:48:25 PM Automator[294] The action “Stop iTunes Visuals” could not be loaded because the application “iTunes” is the wrong version.
    6/11/11 7:48:25 PM Automator[294] The action “Update iPod” could not be loaded because the application “iTunes” is the wrong version.
    6/11/11 7:56:33 PM Automator[294] name = name was not found
    6/11/11 7:56:33 PM Automator[294] name = name extension was not found
    6/11/11 7:56:33 PM Automator[294] name = file type was not found
    6/11/11 8:00:29 PM Automator Runner[339] Error while processing arguments
    6/11/11 8:00:30 PM Automator Runner[339] The action “Import Files into iTunes” could not be loaded because the application “iTunes” is the wrong version.
    6/11/11 8:00:30 PM Automator Runner[339] The action “Add Songs to iPod” could not be loaded because the application “iTunes” is the wrong version.
    6/11/11 8:00:30 PM Automator Runner[339] The action “Add Songs to Playlist” could not be loaded because the application “iTunes” is the wrong version.
    6/11/11 8:00:30 PM Automator Runner[339] The action “Apply SQL” could not be loaded because the application “Xcode” was not found.
    Do I need to wipe the drive again and re-install everything?
    Any help is greatly appreciated. Apologies if this seems long-winded.

    Folder Actions are set up a bit differently in Leopard (they use an AppleScript wrapper), and several actions have been updated to use new technologies available in Snow Leopard.  Looking at some of your console logs, it looks like some actions or workflows were just copied over from Snow Leopard.  When changing versions like that, you should rebuild the workflows so that they link to the correct actions, and check added actions for any dependencies (an action won't be loaded if it requires resources that are not available).
    Resaving your Folder Action workflow as a Folder Action Plug-in should do the trick.

  • Help Needed: Automator Applescript for Folder Action - Encode Video

    Hi !
    I have created an Automator Applescript for a Folder Action to do the following:
    When a new video file is moved to the target folder (i.e. Download of Vuze is done), automatically launch the Applescript Action that does the followin g(Applescripted):
    1) Using "run shell script" and FFMPEG on a UNIX command line, determine Width/Height, Framerate, Bitrate
    2) Calculate encoding parameters (slightly reduced bitrate, reduced Aspect etc.)
    3) Using "run shell script" with ffmpeg on the command line and the calculated parameters to encode the video file
    At the same time, the action is written to a log file so I know if a file is recognized, when encoding started etc.
    It works fine if I save this Action as an .app, make an alias on the Desktop and drop video files on it.
    It also works fine if I attach the script to a folder as a folder action and drag a video file in there.
    However, when I attach the script as a folder action to the Vuze download folder, it encodes only some video files, i.e. if there was a download of 5 files, chances are good that it will not encode 1 or 2 files out of those 5.
    If for example a second download finishes while the encoding for the first download is still going on, sometimes the second file starts encoding after the first encode finishes, sometimes it does not, the file does not make the log file at all, i.e. the folder action missed it or the automator action dropped it because it was still encoding. Still, sometimes it happens, sometimes not.
    As I need a solution that is 100% accurate, I would like to ask if there are any ideas on how to do this better maybe? As I am not an Applescript Guru, I would need some help to know what works and what doesn't and what the syntax is.
    My main idea right now:
    Similar to how ffmpegX works with its "process" application, have a second script (as .app) that receives the files to be encoded from the automator action and puts them in a queue, then proceeds to encode this queue while the main automator action is free to receive the next file.
    Writing this second app is quite straightforward (a modified version of my current script) but I have some questions I need help with:
    1) How do I call another applescript from within an existing applescript that launches the new applescript in a new process?
    2) How do I pass parameters to this new applescript?
    3) In case of this "Queueing" Idea, once I called the external applescript the first time, how do I make sure when I call next time, that I don't open a second instance of this script but rather pass another queue item to the original instance to be processed?
    Or in general: Is there a better way to achieve this automatic encoding solution that I have not thought about?
    Alternatively:
    Does anyone know how to call the "process" application that comes with the ffmpegX package with the correct parameters to use as a queueing / processing tool?
    Thanks!
    Joe
    Message was edited by: Joe15000
    Message was edited by: Joe15000

    To do this, I created an Automator workflow with an Applescript snippet to change the 'media kind'.
    Here is the 'Run Applescript' workflow step code:
    on run {input, parameters}
              tell application "iTunes"
                        set video kind of (item 1 of input) to movie
              end tell
              return input
    end run
    Prior to this running, I have an 'Import Files into iTunes' workflow step.
    You can switch out 'movie' with: 'TV show', 'music video', or anything in ITLibMediaItemMediaKind.
    Good luck,
    Glenn

  • Delaying folder action until file creation is complete

    I'm trying to create a folder action that takes the output of a bounce from ProTools and then imports it into iTunes. The problem I'm having is that it takes real time (about 20 min) to create the complete ProTools file in the folder, however the script begins to execute immediately, before the bounce is complete. This gives me 1 second of audio garbage.
    Is there any way to delay the folder action until the file creation (bounce, upload, transfer, whatever) is done?
    Thanks.

    V.K. Thanks again for your help. When I look in my folder directory/library/scripts/folder action scripts, I see many scripts for images as well as scripts for closing subfolders, converting to pdf, open - show comments in dialog, and add - new item alert, however I don't see anything that was created recently (i.e. something that was created when I built my Automator workflow (folder action). The closest (to what I am looking for) Folder Action Script could find was "add - new item alert.scpt", which is an existing Apple written script, but this will not really help me. When I created my initial automator script, it created a folder and file and workflow in my homefolder/library/Workflows/Applications/Folder Actions/xxx.workflow, however I cannot open this workflow in applescript. I even tried changing the extension to .scpt. I'm not sure I can accomplish the desired result with Automator alone, but I don't think I am well versed enough in AppleScript. Thanks for your help.

  • Folder action to find and replace text and change line feeds

    I want to use a folder action to find and replace text and change Mac carriage returns to DOS line feeds inside text files.
    The text to be replaced is: "/Users/wim/Music/iTunes/iTunes Music/Music" (without the quotes)
    This text has to be removed (i.e. replaced by an empty string)
    The text occurs many times within each file.
    The files are playlists exported from iTunes in the M3U format (which are text files). They contain Mac carriage returns. These need to be changed to DOS line feeds.
    I have found the following two perl commands to achieve this:
    To find and replace text: perl -pi -w -e 's/THIS/THAT/g;' *.txt
    To change carriage returns to line feeds: perl -i -pe 's/\015/\015\012/g' mac-file
    I know that it's possible to make a folder action with Automator that executes a shell script.
    What I want to do is drop the exported playlists in M3U format in a folder so that the folder action will remove the right text and change the carriage returns.
    My questions are:
    Is it possible to make a folder action that executes command line commands instead of shell scripts?
    What is the correct syntax for the two commands when used in a folder action shell script? Especially, how do I escape the slashes (/) in the string to be removed?
    Thanks for your help

    Ok, I've include an applescript to run a shell command. The applesript command quoted form makes a string that will end up as a single string on the bash command line.  Depending on what you want to do, you may need multiple string on the bash command lines.  I've included some information on folder actions.
    It is easier to diagnose problems with debug information. I suggest adding log statements to your script to see what is going on.  Here is an example.
        Author: rccharles
        For testing, run in the Script Editor.
          1) Click on the Event Log tab to see the output from the log statement
          2) Click on Run
        For running shell commands see:
        http://developer.apple.com/mac/library/technotes/tn2002/tn2065.html
    on run
        -- Write a message into the event log.
        log "  --- Starting on " & ((current date) as string) & " --- "
        --  debug lines
        set desktopPath to (path to desktop) as string
        log "desktopPath = " & desktopPath
        set unixDesktopPath to POSIX path of desktopPath
        log "unixDesktopPath = " & unixDesktopPath
        set quotedUnixDesktopPath to quoted form of unixDesktopPath
        log "quoted form is " & quotedUnixDesktopPath
        try
            set fromUnix to do shell script "ls -l  " & quotedUnixDesktopPath
            display dialog "ls -l of " & quotedUnixDesktopPath & return & fromUnix
        on error errMsg
            log "ls -l error..." & errMsg
        end try
    end run
    How to set up a folder action.
    1) right click on folder. click on Enable folder actions
    2) Place script in
    /Library/Scripts/Folder Actions Scripts
    3) right click on folder. click on attach folder action
    pick your script.
    Create a new folder on the desktop & try.
    You can put multiple folder actions on a folder. There are other ways of doing this.
    Here is my test script:
    on adding folder items to this_folder after receiving dropped_items
        repeat with dropped_item_ref in dropped_items
           display dialog "dropped files is " & dropped_item_ref & " on folder " & this_folder
        end repeat
    end adding folder items to
    How to  make the text into an AppleScript program.
    Start the AppleScript Editor
    /Applications/AppleScript/Script Editor.app
    In Snow Leopard it's at: /Applications/Utilities/AppleScript Editor
    Copy the script text to the Applescript editor.
    Note: The ¬ is typed as option+return.  ption+return is the Applescript line continuation characters.
    You may need to retype these characters.
    Save the text to a file as an script and do not check any of the boxes below.

  • I don´t get the option in itunes to import photos from iphoto, how can I get my photos in my ipad?

    I don´t get the option in itunes to import photos from iphoto, how can I get my photos in my ipad?

    So you don't see this and you cannot navigate to it when you select Choose Folder from there drop down menu?

  • Using Automator Folder Actions

    I have an automator folder action that runs to take any pdf file dumped in to the folder, send to the printer and then delete it.
    How do I make this run on a server that I'm not logged in to (effectively as a service), so that if a pdf file is generated somewhere on the network (maybe even a PHP script on a web site hosted on this server) and copied to this folder it still auto prints to the network printer?

    I'm using a hot folder to import to Aperture as well, and also had the same problems when I try to configure it.
    I solve it by creating an action in Automator that will copy all the images from the memory card to a temp folder when a card is inserted in the card reader. At the end of the action all the files inside the temp folder are moved to the actual hot folder, as you said this is almost instant so works perfectly.
    So basicly the workaround is the following:
    Card inserted - Image capture starts and copy all the images to a temp folder - Images then move to Aperture's hot folder - Aperture gets all the images.

Maybe you are looking for

  • Adobe flash not working after recent upgrade on AC100

    Hi After the last update dated 29th july I can't watch flash videos. Frustration This piece of machine is of no use Seems I wasted my hard earned money. Does any one have the same trouble - any solution. Is there anybody from toshiba following the th

  • On Line Galleries In PSE9

    I been using the on line photo galleries feature in PSE in the previos versions and looked forward to doing the same in PSE9. The old galleries were just what I needed for webmastering. I installed PSE9 and the older style galleries (PSE5-PSE7) are n

  • Text messages not copied from sales order to billing

    Text messages which have been given in sales order are not copied to billing. Two of the text are copied and the other two are not getting copied. Checked the access sequence.. everything is correct. Please give a clue.

  • Using API  to run Catalog Bulk Load - Items & Price Lists concurrent prog

    Hi everyone. I want to be able to run the concurrent program "Catalog Bulk Load - Items & Price Lists" for iProcurement. I have been able to run concurrent programs in the past using the fnd_request.submit_request API. But I seem to be having problem

  • Where is help link on 'How to ask a question' ?

    Using Thunderbird. Tried to see where the Help > Help contents link opens. Unfortunately, it does not open on the expected webpage with the immediate help link on 'How to ask a question'. the link would then take the user to getsatisfaction/mozilla_m