RSS Feedings
What's New...
30 Most Recent
dougscrptr
Site Menu
[ Home
[ What's New
[ 446 Scripts...
- ...by category:
- Managing Tracks
- Managing Track Info
- Managing Artwork
- Managing Playlists
- Controlling iTunes
- Exporting Info
- Managing Files
- Networking
- Internet
- iPod
- Miscellaneous
- With Other Apps
- Retro Scripts
- Script List
[ Download FAQ...
[ Forum at iLounge
[ dougscrptr
[ Twitter
[ my delicious
[ Uhm, Windows?
Shareware Apps
- Dupin v1.4.2
- Join Together v5.3.2
- iTunes Library Manager v5.2.1
Site Info
- Who's Doug?
10 Most Recently Added:
Links point to a script's entry page...
- UPDATED October 12, 2008:
Gather Up the One-Hits v2.1 Copy iTunes "one-track wonders" to their own playlist - UPDATED October 6, 2008:
Quick Convert v2.9 Convert or import tracks with any encoder on the fly - UPDATED August 20, 2008:
New iPod Playlist From Selection v3.2 Copy selected tracks or playlist to a new iPod playlist - UPDATED August 20, 2008:
Selected Tags to Lyrics v1.1 Copy selected tags as list to Lyrics tag of selected tracks - UPDATED August 17, 2008:
Rip To iPod v2.1 Rips CD tracks straight to iPod - UPDATED August 17, 2008:
Lossless to AAC Workflow v2.1 Two scripts assist with importing/managing Lossless files and sending converted AAC copies to iPod - UPDATED August 13, 2008:
Update Expired Podcasts v2.0 Update podcasts which have expired by virtue of being ignored for five or more days - NEW August 13, 2008:
Add from Amazon MP3 Folder v1.0 Add files from the Amazon MP3 downloads folder to iTunes - NEW August 13, 2008:
Add from eMusic Downloads Folder v1.0 Add files from the eMusic downloads folder to iTunes - UPDATED August 9, 2008:
GET Available Podcast Episodes v2.0 Download any or all available subscribed Podcast episodes not yet downloaded - the 30 most recent...
30 Most Recent RSS Feed
Your donation allows me keep the site up-to-date, fun, and easy to use. Thanks!
Donations of any convenient size help defray my personal costs in keeping the site going. Making a contribution via Amazon Honor, Kagi, or PayPal is easy, safe, and secure. Future visitors salute you!
Purchase Superb dougscripts.com Shirts & Mugs from CafePress

Purchasing recommended products from Amazon also supports the site!
Top 11 Downloads
Links point to a script's entry page...
[#] = total downloads
- Make Bookmarkable [130066]
- Super Remove Dead Tracks [111095]
- Find Album Artwork with Google [82183]
- Corral iTunes Dupes [70727]
- Import iPod Audio Files [64841]
- Tracks Without Artwork to Playlist [43358]
- CDDB Safari Kit [41685]
- Remove Duplicate Tracks From Playlist [34470]
- Corral All Dupes [30536]
- Set Video Kind of Selected [28761]
- Remove n Characters From Front or Back [27415]
- full list...
Other Sites' Favorites
lifehacker: Top 13 iTunes AppleScripts
Playlist: Top 10 iTunes AppleScripts
Macworld: iTunes' "hidden" features
10 Random Scripts
Links point to a script's entry page...
- Color File Labels of Tracks Set the label color of selected tracks' files based on their kind
(Managing Files) - Append to Comments Batch-append text to comments
(Managing Track Info) - Make 'Track' My String Change 'Track' text of imported tracks to something else
(Managing Track Info) - Check For Purchases Automates the "Check for Purchases" menu command by selecting it, entering your account info, and logging into the iTMS
(Controlling iTunes) - Move Playlists to Folder Move selected playlists to a new or existing folder
(Managing Playlists) - Add Selected Tracks to iPod and Backup Copy selected tracks to iPod and to a designated backup playlist
(iPod) - Comments To Comments Put comments text into file comments box
(Managing Files) - Erase Selected Disc Erase optical discs from within iTunes
(Miscellaneous) - OLGA Tabulature Search Search the OLGA guitar tabulature archives for iTunes songs
(Internet) - Export Via QuickTime Save files of iTunes tracks using QuickTime Pro audio codecs
(Managing Files)
Folder Actions and iTunes
Set up a Folder Action in OS X to automatically add files to iTunes when they are added to a particular folder.
Folder Actions are AppleScripts that you "attach" to a folder in the Finder. When particular actions occur, such as opening the folder, resizing the folder, adding or removing files, the attached AppleScripts are activated and perform their tasks in the background.
This particular script will attempt to add any files to iTunes that have been added to a folder to which it is attached. You first compile and save the script with Script Editor. Name it "add files to iTunes" and save it to Library > Scripts > Folder Actions.
Create a folder to which you will be adding audio files. For discussion, let's call it "New Music" and place it in your "home" folder. Open "New Music" and Control-Click inside its window. From the pop-up click on "Enable Folder Actions" (if you see "Disable Folder Actions", then you are all set). Next, Control-Click again to "Attach a Folder Action...". This will bring up a dialog so you can locate the "add files to iTunes" and select it.
Now, whenever you add a file to "New Music", it will be added to iTunes. Only audio, video and PDF files can be added to iTunes, so don't worry if you drop a Word file or something else in there.
Internet Downloads: If you attach a Folder Action to a downloads folder, say, for example, your "Amazon MP3" downloads folder, you may not get the results you expect. Folder Actions kick in pretty quick once a file is added, sometimes faster than before a file can be completely downloaded (see "One other more thing" below). Your results may vary.
If you want more information on Folder Actions, be sure to read about them at Apple and in the AppleScript Language Guide.
One more thing: if you have your iTunes Preferences set to "Copy files to iTunes Music folder when adding to library" checked, you may want to delete the original file in "New Music" after it is added to iTunes. In that case, remove the block comment tags from the script—the "(*" and "*)"—so that the UNIX shell script commands can be active. These commands will remove the audio file from "New Music"
One other more thing: Since early 2008, I occasionally receive reports that Very Large Files fail to add correctly. Correspondent Kevin Laws describes the issue (see Kevin's fix after the original script listing below):
"AppleScripts attached to folders trigger the file received action when the new file first appears, not when it finishes copying. Your script works great if the file copy to the folder works faster than iTunes can fire up (most songs, for example). When copying movies or copying things over the network, however, iTunes starts importing before the file is finished copying. When I tried your script, it kept triggering as soon as the network copy started, which resulted in a failed import to iTunes (and a deleted file, since I'd put the delete in afterwards).
There are many threads on this topic as a bug in AppleScript. Just Google the following phrase: 'on adding folder items' wait until done.
Here's a thread from Apple:http://lists.apple.com/archives/Applescript-users/2007/Mar/msg00056.html."
Below is the original script. Kevin's fix is listed just after.
on adding folder items to my_folder after receiving the_files repeat with i from 1 to number of items in the_files tell application "iTunes" launch try set this_file to (item i of the_files) add this_file (* -- if you have iTunes set to --"Copy files to iTunes Music folder when adding to library" -- then you might want to delete the original file... -- if so, remove comments from this block and -- use the UNIX commands below to delete the file set the file_path to the quoted form of the POSIX path of this_file do shell script ("rm -f " & file_path) *) end try end tell end repeat end adding folder items to
![]()
Kevin says: "This is what I finally did to the script to make it work properly with large files. Basically, after the file appears it starts checking every 5 seconds to see if the file is still copying, which it can tell because the file size is still growing from the last time it checked. After the file size stops growing, it does the part of the script you suggested which imports into iTunes (and optionally removes the file)":
property DELAY_TIME_SECONDS : 5 -- How long to wait between checking file size. on adding folder items to thisFolder after receiving theItems repeat with f in theItems set oldSize to 0 set newSize to -1 -- When newSize equals oldSize, it means the copy is complete because the size hasn't changed. repeat while newSize is not equal to oldSize -- Get the file size. set oldSize to size of (info for f) delay DELAY_TIME_SECONDS -- Sample the size again after delay for comparison. set newSize to size of (info for f) end repeat -- HERE BEGINS THE ITUNES SPECIFIC STUFF tell application "iTunes" launch try add f (* UNCOMMENT OUT NEXT 2 LINES IF YOU WANT THE FILE REMOVED AFTER IMPORT set the file_path to the quoted form of the POSIX path of f do shell script ("rm -f " & file_path) *) end try end tell -- HERE ENDS THE ITUNES SPECIFIC STUFF end repeat end adding folder items to
![]()
