Working with folders and iTunes

Trying to solve the problem that I can't use iTunes to manage my mp3 library because I've got other hardware and apps that use it. So I've got to do it manually...which then leads to iTunes being out of sync.
The mp3's are on my NAS device.
I've gotten so far with an AppleScript to do it but it falls over on a folder with an '&' in the name.
I'm fairly sure its related to posix and properly referencing the folder.
Any guides or tutorials on writing scripts that use network folders?

-- iTunes Folder Sync.applescript
-- iTunes Folder Sync
-- Created by Chris Beach on 28/06/2006.
-- Copyright 2006 All rights reserved.
-- addToLib v 1.1 - An AppleScipt application that adds all files in a given folder to the
-- iTunes Music Library and then (optionally) deletes the files from the source folder
-- Modified from the Add to iTunes Library Desktop Droplet Script by Apple Computer, Inc.
-- Copyright 2004 Ken Barnt <[email protected]>
-- Change Log
-- v 1.0 - original release
-- v 1.1 - fixed bug where sub directories would not be recursed
-- - added support for AAC and Protected AAC files
-- This software is distributed under the Apple Public Source Licence
property myFiletypes : {".mp3", ".aiff", ".aac", ".wav", ".mov"}
global counter, playlist_status, this_playlist
on run
-- set the following variable to the path to the folder whose contents
-- you want to add to the iTunes Music Library
set temp_folder to "MEDIA:Music"
display dialog "Import Folder is: " & temp_folder & " Continue?" buttons {"Cancel", "Ok"} default button 2 with icon 2
if the button returned of the result is "ok" then
processfolder(tempfolder)
--display dialog counter & " items added!"
end if
end run
-- this sub-routine processes folders
on processfolder(thisfolder)
display alert POSIX path of this_folder
set this_folder to the POSIX path of this_folder
set these_items to list folder this_folder without invisibles
repeat with i from 1 to the count of these_items
-- try
set myItem to ((this_folder as string) & ":" & (item i of these_items) as alias)
tell application "Finder" to set IsFolder to (kind of myItem = "Folder")
if IsFolder is true then
processfolder(thisfolder & ":" & (item i of these_items))
else
--check extension
tell application "Finder" to set myExtension to "." & (name extension of myItem) as string
if myFiletypes contains myExtension then
set this_item to myItem as alias
--display alert (myItem as string)
--processitem(thisitem, (path to myItem) as string)
end if
end if
-- end try
end repeat
end process_folder
-- this sub-routine processes files
on processitem(thisitem, item_folder)
try
tell application "iTunes"
launch
set this_track to add this_item to playlist "Library" of source "Library"
if "_Compilations" is in item_folder then set this_track's category to "Compilation"
if "_SoundTracks" is in item_folder then set this_track's category to "Soundtrack"
if "_Classical" is in item_folder then set this_tracks's category to "Classical"
if "_Games" is in item_folder then set this_track's category to "Game"
if "_Singles" is in item_folder then set this_tracks's category to "Single"
if the playlist_status is "OK" then
duplicate this_track to this_playlist
end if
end tell
set counter to counter + 1
end try
end process_item
you can see where i've been playing with posix!

Similar Messages

  • Microphone works with Utube and iTunes but only with earphones for games and Facebook

    Microphone works with Utube and iTunes but only with earphones for games and Facebook, obviously the microphone works but is there something I need to turn or or something to get the external microphone to work for everything?

    Microphone works with Utube and iTunes but only with earphones for games and Facebook, obviously the microphone works but is there something I need to turn or or something to get the external microphone to work for everything?

  • Working with folders and save metadata to file compatability.

    when i edit in developer within lightroom, then move from the 'previous import' list to the folders which hold different projects by dragging them into the folders i have imported from the hard disk, it saves only the original files, and not my new edits.
    do i have to batch export everything i edit in lightroom to be able to use it in non adobe applications??
    i tried save metadata to file for these images, and then in finder they are no longer available for quickview (spacebar or command y) and finder quits. futhermore when these files, with the updated metadata, are dropped into an iwork file, they are not recognised as jpeg's anymore. but do work in photoshop, and i assume other adobe applications because the embedded metadata was designed to be compatible with adobe.
    how can i have the 'develop' editing i am doing in lightroom transfer to the folders i want to have these images saved in without laboriously exporting them and having saved each image twice? does lightroom have a way i can do this?

    If you're largely preparing images for the web, you simply export a batch from LR at the appropriate size and quality, in sRGB space, with or without metadata as you choose. Nothing laborious about it.
    Are you starting with JPEGs or RAW images?
    The bug in Leopard is known, but you also cannot expect the Finder to show what edits you have made in LR until the images are rendered out, as they are in an Export.

  • Working with Folders and Sub-Folders

    I'm updating this big site, and its pages are organized into
    folders. I've only ever organized my images and .pdf files with
    folders not my html files but all my prior sites have never had so
    many files as this one. It’s starting to drive me crazy
    though because pages in folders aren't connecting to scripts in the
    scripts folder, menus aren't working right because of it and I'm
    not sure what I can do to fix it.
    My question is if images are showing up in these sub-pages,
    the linked css is being applied in these sub-pages why are the
    scripts not working in the sub-pages? For example, all the top
    level pages easily connect to the rotating JavaScript banner, but
    as soon as you go into a sub-folder page the banner disappears. All
    these files are being updated via templates so any changes I'm
    doing is affecting all the pages the same. That’s why
    it’s confusing me why an image would connect the same but a
    script wouldn't. Don't they search for their links root down or
    does it search the folder its in down? How can you get templates to
    work under such conditions where files are both in the root and in
    folders and sub-folders?
    Site reference is:
    http://golfforkids.net/focus/index.html
    Please note that this is a temporary domain for testing. The
    top menu will pop up a window saying that it needs to be
    registered. They are, just not to that domain and I don't have
    access to the native domain. Sorry for the inconvenience!
    Thank you for any clarification!!!

    ''"Are you subscribed to those subfolders?
    File (Alt-F) - Subscribe"''
    Please see #2 in original post:
    ''"2) Trying to Subscribe to folders only shows Inbox, not sub-folders for Inbox."''
    Attached is an image illustrating this (this screenshot was taken after forcing Thunderbird to show Inbox folders as described in #3 of OP)
    {In OP I was unable to attach images}

  • Cannot print "working with files and folders htm

    When I try to print "Working with files-and-folders" from a Google search, it only prints part of it. I have changed my destination folder to no avail. Thank you or any help, Jack Menendez

    What's the best method for moving all my nonsystem related stuff over to this new driveIan has provided you with the best solution, SuperDuper.
    But if you have a 250 GB external, you really ought to clone your entire system,(only about 3 GB) so you have a backup.
    I keep mine with a complete clone of my internal, that way it is easy to boot from the external and run utilities like Disk Utility, TechToolPro, DiskWarrior, etc. on the internal and vice versa.
    If you run into a problem with say Preferences and don't know which one is the troublemaker, just trash the whole pref folder and use the good one from the clone. Font problem, same deal. And, if diaster ever strikes, you can just boot up from your external and keep right on working - fix the internal when you have time.
    That's my 2 cents anyway
    -mj
    [email protected]

  • Why won't some photos or videos sync to my iPad when they work fine with iPhoto and iTunes?

    Why won't some photos or videos sync to my iPad when they work fine with iPhoto and iTunes? Other photos taken with same camera sync fine from iPhoto while certain events are inexplicably incompatible. I've recently foundvthecsame occurrence with certain mp3s and videos from iTunes.

    For photos try deleting the photo cache from your computer and then re-try the photo sync and see if they then copy over - the location of the cache, and how to delete it, is on this page http://support.apple.com/kb/TS1314
    Not all video formats that work in iTunes are compatible with the iPad - the supported formats are (from http://www.apple.com/ipad/specs/) :
    Video formats supported: H.264 video up to 720p, 30 frames per second, Main Profile level 3.1 with AAC-LC audio up to 160 Kbps, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats; MPEG-4 video, up to 2.5 Mbps, 640 by 480 pixels, 30 frames per second, Simple Profile with AAC-LC audio up to 160 Kbps per channel, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats; Motion JPEG (M-JPEG) up to 35 Mbps, 1280 by 720 pixels, 30 frames per second, audio in ulaw, PCM stereo audio in .avi file format
    Have you tried Advanced > Create iPad Version and then sync those versions to the iPad
    The iPad's supported audio formats are :
    HE-AAC (V1 and V2), AAC (8 to 320 Kbps), Protected AAC (from iTunes Store), MP3 (8 to 320 Kbps), MP3 VBR, Audible (formats 2, 3, and 4, Audible Enhanced Audio, AAX, and AAX+), Apple Lossless, AIFF, and WAV

  • Hello, my itunes app is getting shut down every time I want to open it. Ever since I downloaded the last two updates. I tryed repearing the file and uninstalling and installing several times. Still, is not working. I work with music and need my itunes

    Hello, my itunes app is getting shut down every time I want to open it.
    I don't know if it's related but ever since I downloaded the last two updates. I tryed reparing the file and uninstalling and installing several times. Still, is not working. I work with music and need my itunes up and running. Does anybody know how to fix this?

    Hi Vero Torres,
    If you are having issues with iTunes unexpectedly quitting on launch after on your Windows machine, you may find the troubleshooting steps outlined in the following article helpful:
    iTunes for Windows Vista, Windows 7, or Windows 8: Fix unexpected quits or launch issues
    http://support.apple.com/kb/ts1717
    Regards,
    - Brenden

  • Problem with podcasts and iTunes 6.0.1.3

    Hi everybody!
    First of all, please excuse my poor English: I'm French. I'll try to do my best to write as well as I can.
    I have some difficulties with podcasts and iTunes 6.0.1.3.
    When I "sign up" (FR: "s'abonner") to some podcasts, they are not updated in my iPod nano indeed (and some others are), although iTunes says: "Your iPod is updated" (FR: "Votre iPod est à jour").
    I have no way to put these podcasts episodes in my iPod...
    Could you help me please?
    Thanks in advance for your help!

    Hi iFriend,
    try this, it worked for me:
    1) first of all, uninstall QuickTime and older versions of iTunes from your PC, using the "remove" button in the "install applications" tool that you find in the windows control panel.
    2) reboot the system
    3) turn off the windows firewall application; go into the windows control panel, double click on windows firewall and disable the firewall option
    4) if you have one, disable your Anti-Virus application; i mean its real-time protection.
    5) probably it's not necessary, but for being sure... download and launch the standalone installer of QuickTime (latest version)
    6) download and launch the iTunes + QuickTime installer from this web address
    7) as an option, i suggest you to download and install also iTunes Art Importer. It's a nice application, that allows you to import from the internet directly into iTunes the album ArtWorks of the selected tracks in iTunes. I installed it, and it works very well with iTunes 6.
    8) after all the installations, remember to enable both firewall and anti-virus previously disabled!
    as i said, probably the 5th passage is not necessary, but i did it and it worked!
    if you have any questions or feedbacks, just relpy to this topic. stay iTuned!
    bye, bye,
    Marco

  • I am considering buying an iPad 3. I have an iMac with OSX 10.6.8. On the iMac I have many photos and work with iPhoto and Photoshop Elements on the computer. Can I interchange or transfer photos and other work from the iMac to the iPad? How?

    I am considering buying an iPad 3. I have an iMac with OSX 10.6.8. On the iMac I have many photos and work with iPhoto and Photoshop Elements on the computer. Can I interchange or transfer photos and other work from the iMac to the iPad? How?

    velma Monreal wrote:
    I am considering buying an iPad 3. I have an iMac with OSX 10.6.8. On the iMac I have many photos and work with iPhoto and Photoshop Elements on the computer. Can I interchange or transfer photos and other work from the iMac to the iPad? How?
    Yes you can. In iPhoto create a Album with the photos you want in it. You can drag them from your Events folder. In iTunes with your iPad connected go to Photos by cliking on your iPad. You can then select the album or events you want.

  • Is Working with Folders in EASY DMS only

    Hi DMS Gurus,
    1) Is Working with Folder a Special feature of Easy DMS and not much use if we donu2019t go for specifically working with Easy DMS,
    2) Can Easy DMS and Normal DMS work simutaniously, ie.. can both be implemented simultaneously and used parallely when and where each ones need is raised.  
    3) What r the limitations of going with EASY DMS as compared to normal DMS,
    like Working with Folders can be configured with normal DMS implementations also?
    Thanks in Advance,
    Kumar

    Hi Kumar,
    Easy DMS is an external software which can be installed.
    In Easy DMS working/managing with the folders is the great facility which is not overall possible in standard DMS.
    Easy DMS fetches the backend configuration done in standard SAP. Depending upon the user's comfortability Easy DMS is used,if user is not comfortable with the standard sap screen then he can use Easy DMS where all functions like standard DMS can be used.
    Maintaining folders is a option for which Easy DMS is used very regularly.
    Configurations watever done once in standard DMS is applicable for both standard DMS and Easy DMS.
    In Easy DMS particular authorizations can be provided for particular folders.
    Thank You,
    Manoj
    Pl. reward if useful.

  • Working with folders Folders

    Can anyone help me????? I work with folders in logic 7.2.3 for example I have my drums in a folder, vocs in a folder, as well as guitars and other instruments. The problem occurs when I record say vocals, because after the recording stops logic jumps out of the folder meaning I always have to double click the folder to get back to the recording that was made. I think it's a setup problem because in older versions of I had no problems. Everything else works fine. Help!!!!!!

    What's the best method for moving all my nonsystem related stuff over to this new driveIan has provided you with the best solution, SuperDuper.
    But if you have a 250 GB external, you really ought to clone your entire system,(only about 3 GB) so you have a backup.
    I keep mine with a complete clone of my internal, that way it is easy to boot from the external and run utilities like Disk Utility, TechToolPro, DiskWarrior, etc. on the internal and vice versa.
    If you run into a problem with say Preferences and don't know which one is the troublemaker, just trash the whole pref folder and use the good one from the clone. Font problem, same deal. And, if diaster ever strikes, you can just boot up from your external and keep right on working - fix the internal when you have time.
    That's my 2 cents anyway
    -mj
    [email protected]

  • I believe my ipads hard drive corrupted when i went from my macbook to a pc...I can get to the screen with cord and itunes but cant get past there to desktop of ipad...Any help would be appreciated....

    I believe my ipads hard drive corrupted when i went from my macbook to a pc...I can get to the screen with cord and itunes but cant get past there to desktop of ipad...Any help would be appreciated....

    Try using this article to help with your iPad not showing up in iTunes---
    http://support.apple.com/kb/TS1538     -This deals with the device not being recognized in iTunes for Windows
    The following steps work well with iPod but i would try them for help with your iPad issue:
    Try connecting your iPad to another USB port directly on the computer. Verify that you're connecting it to a high-powered USB 2.0 port on your computer to be sure iPad is getting power. If you're connecting to a Windows laptop computer through USB, connect the laptop to a power outlet before connecting your iPad. Also, see iPod not recognized when connected to Windows laptop over USB to be sure that your USB ports are supplying enough power.
    Avoid connecting to an external USB hub. If a hub must be used, make sure the hub is USB 2.0, and that it has its own power supply. Also, make sure the hub is connected to a high-power USB 2.0 port on your computer.
    If the issue persists, try disconnecting other USB devices from the computer such as printers, cameras, scanners, external hard drives, and USB hubs to determine if there is a conflict in the USB chain.

  • FaceTime no longer working with Yosemite and IOS 8.1

    I have used FaceTime flawlessly for some time with no issue.
    After I upgraded to Yosemite on my MacBookAir and IOS8.1 on 5S and iPad air, I've had a problem connecting.
    When I get a call, all the devices ring (as they should) but it will not connect on the first device I pick up on.  It says connecting
    but all the other devices keep ringing and finally it says I have a missed call.  The connection does not happen.  If I turn off
    all devices except one, it will work...... do we have a bug here??

    Thank you for responding to my issue.  I spent the better part of two hours trying to get this to work.  Bluetooth is enabled on all devices. Each computer is set in Preferences/General to allow Handoff.  All computers and iPhones are on the same WiFi network.  I toggled all of the major settings off and on.  Rebooted each of my computers several times. I finally conceded defeat.  Then my daughter asked to have a try at it.  She worked on the first MBP for about thirty minutes and informed me that she had gotten continuity to work.  And indeed, on her MBP late 2012 she is able to use the continuity features in both directions between her computer and her iPhone 6.  But it only works with Mail and Safari.  I asked how she accomplished this feat.  She said she turned off "everything" on her computer and iPhone (WiFi, Bluetooth, "Allow handoff" under Preferences/General) and then rebooted both the iPhone and the computer.  She then turned everything back on.  This worked for her.  So we tried the same thing on my MBP and iPhone 6.  Now continuity works partially. Email activity is mirrored on both the MBP and the iPhone regardless of which device initiates the continuity activity.  But Safari activity on the computer is mirrored on the iPhone but not in the opposite direction.  There is no continuity function for Pages in either direction.  The telephone connectivity works fine on all of my devices– 3 MBPs, Mac Pro, iPad Air, 2nd gen iPad and 3rd gen iPad.

  • Looking for an app that works with Mac and iPhone that will set calendar reminders of birthdays in contacts.

    Looking for an app that works with Mac and iPhone that will set calendar reminders of birthdays in contacts.

    Hi ron1098,
    Try my application Dates to iCal. it runs on the Mac, but you can sync the calendar to your iOS device.
    See more about Dates to iCal here. It is £4 shareware with a 2 week demo.
    Best wishes
    John M
    As I sell software on my site and ask for donations, the Apple Support Communities Use Agreement requires that I state that I may receive some form of compensation, financial or otherwise, from my recommendation or link.

  • Handoff not working with Yosemite and iOS 8

    I have three Macbook Pros in my household.  Two are mid 2012 models and the other a late 2012 model.  Each is supposed to support the handoff feature of Yosemite and ios8.  Everything seems to work properly between my daughter's late 2012 MBP and her iPhone 6.  But on the other two MBPs in our family the continuity feature does not work on either of them.  Receiving and sending calls works fine.  But the continuity does not work even though all three MBPs and all three iPhone 6 are on the same wifi network.
    I've tried all the suggestions that I could find.  Toggling off and on the various settings on the MBPs and the iPhones.
    John

    Thank you for responding to my issue.  I spent the better part of two hours trying to get this to work.  Bluetooth is enabled on all devices. Each computer is set in Preferences/General to allow Handoff.  All computers and iPhones are on the same WiFi network.  I toggled all of the major settings off and on.  Rebooted each of my computers several times. I finally conceded defeat.  Then my daughter asked to have a try at it.  She worked on the first MBP for about thirty minutes and informed me that she had gotten continuity to work.  And indeed, on her MBP late 2012 she is able to use the continuity features in both directions between her computer and her iPhone 6.  But it only works with Mail and Safari.  I asked how she accomplished this feat.  She said she turned off "everything" on her computer and iPhone (WiFi, Bluetooth, "Allow handoff" under Preferences/General) and then rebooted both the iPhone and the computer.  She then turned everything back on.  This worked for her.  So we tried the same thing on my MBP and iPhone 6.  Now continuity works partially. Email activity is mirrored on both the MBP and the iPhone regardless of which device initiates the continuity activity.  But Safari activity on the computer is mirrored on the iPhone but not in the opposite direction.  There is no continuity function for Pages in either direction.  The telephone connectivity works fine on all of my devices– 3 MBPs, Mac Pro, iPad Air, 2nd gen iPad and 3rd gen iPad.

Maybe you are looking for

  • Printer Problem with HP Office jet 6600

    I have the following message displayed on the printer. There is a problem with your printer or ink system. Turn the printer off then back on if the problem persist contact HP. I have searched through the HP suggestion for repaid but find no match. I

  • Blackberry buttons not working, Please help!

    I was using my blackberry and all of a sudden the trackpad started have a slow reaction time. THen when i went to hit the button to select it wouldn't. Now if i press the talk key the letter jk come up, if i hit the blackberry button the letters ij c

  • CMS Player 5 Sees ZenTouch in Vista System but won't display conte

    I spent two days researching what to do to get my Zen Touch to work on a new Vista system: 1) I uninstalled WMP and WMP runtime from my old XP system Note: none of the following steps went smoothly (i.e. the CMSP5 wouldn't install because I didn't ha

  • Edited photos become unedited when inserted to Pages

    Using Pages on an iPad 4. Let's say I take a picture with my iPad. Open the picture in Photos. Edit the photo, specifically crop it. Open up Pages and insert the cropped picture into the document. The picture will appear in its original state, that i

  • Flip4Mac 2.3 (64 Bit) Issues with WMV Exports and Toast - Be Aware

    I was making DVD's from WMV files and noted they encoded rather swiftly in Toast, which seemed great until it was clear that Toast was encoding roughly 1/2 of the WMV file. Not exactly 1/2 , just around 1/2. 20 minutes would be 9, 11, 8 1/2 etc. Pret