How do I find out if Keep Itunes Media Folder Organized option is enabled programtically

How do I find out if Keep Itunes Media Folder Organized option is enabled on Windows. My Java application needs to know this because it effects how it should interact with iTunes and last time I looked the api provided by the iTunes.dll doesnt provide this information.
I have made some progress looking at iTunesPrefs.xml which stores preferences in a binary plist format and have mananged to extract the location of the iTunes xml file using a Java library called dd-plist
public File getITunesXMLFile()
        System.getProperties().list(System.out);
        String homedir = System.getProperty("user.home");
        File prefsFile = new File(homedir,"AppData/Roaming/Apple Computer/iTunes/iTunesPrefs.xml");
        File xmlFile;
        try
            NSDictionary rootDict = (NSDictionary) PropertyListParser.parse(prefsFile);
            NSDictionary userPrefs = (NSDictionary) rootDict.objectForKey("User Preferences");
            if(userPrefs!=null)
                NSData iTunesLocation = (NSData) userPrefs.objectForKey("iTunes Library XML Location:1");
                if(iTunesLocation!=null)
                    String base64 = iTunesLocation.getBase64EncodedData();
                    String filepath = new String(Base64.decodeBase64(base64),"UTF-16LE");
                    xmlFile = new File(filepath);
                    System.out.println(filepath+":File Exists:"+xmlFile.exists());
                    if (xmlFile.exists())
                        return xmlFile;
        catch(Exception ex)
            ex.printStackTrace();
            //Use default then
            xmlFile = new File(homedir + "/Music/iTunes/iTunes Music Library.xml");
            if (xmlFile.exists())
                return xmlFile;
        return null;
However the Keep Itunes Media Folder Organized option appears to be stored in the Documents:132 key with other options and this library doesnt seem able to decode the daat into a  base64encoded value. I did think I could just compare differences between the file after enabling/disabling the option in iTunes, but the results are inconclusive - sometimes after chnaging the option the preferences file doesnt seem to change.
Is there a known hack for this ?

Thanks that certainly a possible workaround that I can see working but Im not that keen on using a users file as a test file, or adding a file myself that I have to keep deleting.
The thing is I'm very close, I've found a library that can read the binary xml format to some degree, and managed to decode the Xml Library File sucessfullly (but I don't need to this as available as the in the COM lib anyway as itunes.getLibraryXMLPath())
but I cannot decode this option whihc is lumped in with others, real shame they dont provide it via the COM lib.
Added this link showing progress in case interested:
http://stackoverflow.com/questions/17957433/how-can-i-work-out-if-ituneskeep-itu nes-folder-organized-is-set-programmaticall

Similar Messages

  • ITunes 12.1.0.71 broke "Keep iTunes Media folder organized" option

    After upgrading to iTunes 12.1.0.71 (64 bit) on my PC, iTunes is no longer organizing my iTunes media folder.
    Example:
    I drop a video into "automatically add to iTunes" folder
    Video appears as a Home Video in iTunes as expected
    I go into "get info" > Options for the video and set the Media Kind to "Movie"
    Video now appears in the Movie lists, however(!)
    iTunes does NOT move the file out of iTunes/Home Videos into iTunes/Movies on my hard drive like it used to
    So now I have Movies piling up in the "Home Video" folder instead of getting auto-sorted correctly. The "Keep iTunes Media folder organized" option I have enabled in preferences is, obviously, not working.
    This is happening for "TV Shows" as well. In addition, I can no longer set disc (season) and track (episode) numbers for TV Shows so that they're renamed with the season/episode numbers in front of the episode name. There used to be a work-around where I would shift-click "Get Info" to get into the old style pane / control panel, but this no longer works. I can't figure out how to rename files from within iTunes to force the issue. If I rename the files by hand before importing into iTunes, iTunes erases the disc/track numbers off the front of the filenames.
    Does anyone know what's wrong? Why are my videos not auto-sorting into the correct folder / sub-folder hierarchy on my hard drive? Why is everything piling up in my "Home Video" folder even though iTunes has been told that they are NOT home videos? Help!

    iTunes 12.0 had an issue with not moving video files around after tag/media kind changes. That seems unchanged. A workaround is to uncheck the Keep organized option, click OK, then set it active again.
    The iTunes 12.1 version of Get Info appears, at first glance, to include all of the properties that were only available in the old school get info dialog in the previous version. Also gone are the Add Field button for optionally enabled fields, and the autocomplete on space bug. The old dialog doesn't seem to be available from any keyboard combination, although I quite possibly haven't tried everything.
    tt2

  • Is it possible to "Keep iTunes Media folder organized" with multiple folders?

    It bothers me, I am not proud of this, that I hunt through my "Music" folder to find my TV Shows etc.  I would like to separate my iTunes media in folders by type, or conform to the default OS X home folder's subfolder nomenclature.  I would settle for setting up another scheme involving seperate drives, Applescript or Automator; in order than iTunes would add appropriate media to appropriate folder.

    jamms wrote:
    It bothers me, I am not proud of this, that I hunt through my "Music" folder to find my TV Shows etc
    It is in the /iTunes/iTunes media/TV Shows/ folder.
    You can only view TV Shows in iTunes so why do you need to "hunt" them anywhere?
    If you really need to, you can select the TV Show (or movie or music or podcast, etc.) right click, Show in Finder.

  • What happens after unchecking 'Keep iTunes Music folder organized'?

    After unchecking the 'Keep iTunes Music folder organized' option, am I right in thinking that future additions to the library are simply linked from their default location? If so, what happens when ripping CDs, and how is it possible to rename or move files/folders without iTunes failing to find them and having to add them again?

    It's more what doesn't happen rather than what does. If you like to organise your own folders in your Music folder you must leave it unchecked, as checking it gives iTunes the authority to rename and move tracks at will.
    If you rip a CD with iTunes and the iTunes Music folder according the tabs recovered from Grace note. The hierarchy is Artist\album.
    This is not affected by Keep iTunes Music folder organised.
    If you add tracks already on your PC, depending on the setting of "Copy to iTunes Music folder when adding to library, iTunes will either store a link to the track in its current location or copy it into the iTunes Music folder according to the tags.
    It is not possible to move or rename any track in your library or iTunes will lose it. There is no folder watch feature.
    So you need to place and name a file BEFORE adding it to the library if you want to manage your own folders. Once added you can't change it without having to either add it again or find it manually in iTunes.
    The only thing you can do is to use iTunes to move the whole iTunes Music folder to a new location.
    Message was edited by: polydorus

  • I have my personal music (not purchased from Itunes) stored in two locations, on my PC and on an external HD. How can I find out which directory itunes uses to access this music? I am using Itunes version 11.4.0.18. Thanks

    I have my personal music (not purchased from Itunes) stored in two locations, on my PC and on an external HD. How can I find out which directory itunes uses to access this music? I am using Itunes version 11.4.0.18. Thanks

    Many thanks JEM24 for your help.  Ive just spent the best part of six hundred pounds on a new Sony Rx100m2 compact camera, so I have no interest in the Ipods camera at all really. I doubt Ill be watching many videos on it as Im very lucky in that I have a good Android tablet. Its more as a stock music player that Ill be buying the Ipod for, if indeed I do end up buying one. I dont like the idea of paying the exorbitant amount added for more memory space that Apple along with most other companies charge. In fact I read an article on this very subject just yesterday in the tech section of Flipboard. It stated in the article that in the case of the Iphone  the actual cost of each additional  gigabyte of storage  to Apple et al is something in the order of 60p.. This is certainly not reflected in the price us the customer has to pay at the till.. Its for this reason primarily that Apple in particular, because their products do not allow adding expandable memory of your own in the form of cheap to buy cards, that nobody in their right mind buys the 64gig etc Iphones..I am aware that we are discussing my potential purchase of an Ipod Touch here but you see my point. Many thanks again though for helping me.

  • How do I find out if my iTunes ID is the same as my iCloud password?

    How do I find out if my iTunes password is the same as my iCloud password?

    Hello jenny86753092008,
    Welcome to the Apple Support Communities! Your iTunes and iCloud passwords will always be the same unless you have multiple accounts with us. To check to see if you have multiple accounts, you can use this handy Apple ID tool:
    Apple - My Apple ID
    https://iforgot.apple.com/appleid
    You can also contact us for assistance to see if you have multiple Apple ID accounts:
    If you forgot your Apple ID password - Apple Support
    http://support.apple.com/en-us/HT201487
    Make sure that you’re entering the correct Apple ID. In most cases, your Apple ID is also the primary email address of your Apple ID account. If these steps didn't help you change your password, contact Apple Support.
    Cheers,
    Matt M.

  • Keeping itunes music folder organized

    I have the box checked for "keep itunes music folder organized" but noticed that the folders on my computer are not consistent with how certain albums are organized in itunes.
    For example, I have a series of albums, all with the same name, Vol. 1-6. On itunes, they are all properly separated by Vol number and disc number, but in the folder on my computer, they are all lumped in together in the same folder.
    Anyone know how I can fix this because I really want to keep my itunes music folder consistent with how the music is layed out in itunes.
    Thanks much.

    I just ripped a 4-disc set that had really bad Gracenote tags.
    I had to fiddle around with things so itunes could organize them properly. If you want more details, post back.
    I really don't think this is an itunes bug. I think it's an issue with a bad Gracenote entry.

  • Keeping itunes media folder organised slows down itunes

    My itunes became very very slow indeed when I updated to version 9. I looked at self help forums and discovered that it should speed up if I unchecked "keep itunes media folder organised". I did that, and sure enough, itunes was cured.
    Somebody then said that if I re-checked it, then the folder would be re-organised, and everything would be OK. I did this, and it took all night to organise my library (although it wasn't actually 'disorganised'). However itunes had just returned to being glacially slow.
    So why is this happening? I can't find any cure for it, although I suppose one might have been found by now.
    This is on a G4 ibook, 1.42 GHz. It ran itunes 8 with no problem at all. Leopard

    I don't use the feature myself, but it works properly in a test library for me.
    It could possibly be a permissions issue. Different processes in iTunes seem to make use of either the system or the user account for file actions and it is just possible that which has been used in that case has changed. See Repair security permissions for iTunes for Windows for details.
    tt2

  • ITunes 12 - "Keep iTunes Media Folder Organised" feature no longer works

    Hi everyone, I was wondering if you could help me with an issue I've been having.
    Since updating to iTunes 12, the 'Keep iTunes Media Folder Organised' feature no longer works. When I add media to the library, iTunes doesn't copy it to a destination within my media library. It only works if I turn the feature off, and then back on again.
    Thanks in advance for any help.

    I don't use the feature myself, but it works properly in a test library for me.
    It could possibly be a permissions issue. Different processes in iTunes seem to make use of either the system or the user account for file actions and it is just possible that which has been used in that case has changed. See Repair security permissions for iTunes for Windows for details.
    tt2

  • How could I find out filenames inside of every folder in a tree?

    If I wanted to search for all .jpeg under pictures where there's sub folders how can I find out all the .jpeg available under pictures?

    Take a look at File.isDirectory and File.listFiles.

  • HT4527 I want to move my music onto my computer, I have music stored on my laptop not in itunes, how do i put it into an itunes media folder and consolidate it without itunes?

    Basically I didnt have enough room to consolidate my itunes libary on my C drive, I moved them to my D, they then were no longer in my itunes libary, I moved them back but the songs are still no longer in my libary. This is not a major issue, the problem is getting all my music into a itunes media folder and then consolidating it without the use of iTunes.

    Copy the entire /Music/iTunes/ folder from old computer to /Music/ on new computer.
    Launch iTunes.
    That is all you need to do.

  • HT1449 How do I find out which file iTunes actually needs/uses?

    I have recently transferred my iTunes libary to an external hard drive (Migration Assistant didn't work, so I dragged and dropped the whole iTunes folder from my other, Windows, external hard drive straight to the new external hard drive, and added the other file that does playlists etc by e-mailing the library file to myself, and 'importing playlist' on the new mac... I still don't have ratings, but that's not a biggie). This is to use as a central library for all users. Works ok, both users face it, all ok... However, the total size of my music library is some 40gb, according to my old laptop and itunes on the new Mac... but on the external hard drive, there is now some 139gb of data (the only other stuff is about 80 pictures, so not much in data terms). This isn't a pressing need as the new external drive is 2tb, backing up to a 2tb Time Capsule, so still plenty of storage left for my wife to add her photos and her music.
    So how do I know what to delete? There's each album listed separately, and some old temp files (have deleted the latter), but I'm scared of deleting things I do actually need. I'm at work now, so can't give exact descriptions. Anyone have any clues?

    Have read up a bit more, and I think I've found a solution... my wife's music is very much smaller than mine, and I'd like to preserve the ratings on my collection. She's not bothered.
    So here's the plan: broadly following iTunes: How to move your music to a new computer, using external drive.
    1. delete the iTunes folder previously placed on the new, Mac ext HD (what will be the joint library). No media hopefully now on this machine.
    2. copy her iTunes folder from the old ext HD to the desktop of the new Mac. This was consolidated before copying to the ext HD. This will essentially become the backed-up 'previous content' to add back in later.
    3. Delete her iTunes folder from the old ext HD to avoid confusion.
    4. Copy my old laptop's iTunes folder to the old ext HD
    5. Drag the itunes folder from the old ext HD to the new mac ext HD, both showing on the desktop (which should preserve rating etc, right?)
    6. add back in the itunes folder on the desktop that I placed there earlier, using file> add to library in iTunes. (ratings not preserved)
    Both users iTunes are already instructed to face the new ext HD for their library.
    Will this work? Why is one set of ratings etc preserved but not the other?

  • How can I find out the name of the folder my java program is in?

    Hi, I'm trying to make a little utitlity that makes a bunch of url shortcuts based on the name of the folder I run the java from.
    i.e.
    I have my executable jar in C:/Someplace/My Folder Name/
    I'd like to be able to double click on the jar and it creates the url shortcuts for me using "My Folder Name" as a parameter.
    I've done the shortcuts bit but can't figure out (=find a tut) how to read the folder name.
    Thanks to anyone who can help!

    import java.io.*;
    import java.net.*;
    import java.security.*;
    public class Attempt {
        public static void main(String[] args) throws IOException {
            System.out.println(new Attempt().getFolder());
        public File getFolder() throws IOException {
            ProtectionDomain domain = getClass().getProtectionDomain();
            CodeSource source = domain.getCodeSource();
            URL url = source.getLocation();
            if (!"file".equals(url.getProtocol())){
                throw new IOException("Code source location not a file:" + url);
            String path = url.getPath();
            //remove xxx.jar from path:
            return new File(path.substring(0, path.lastIndexOf('/')));
    }

  • Was there a change to the location where iTunes copies media with the "Keep media folder organized" option selected?

    iTunes was copying my media to for example:
    \volume\iTunes\Music\Artist\Album\tracks.mp3
    \volume\iTunes\Movies\Movie\movie.mp4
    \volume\iTunes\TV Shows\TV Show\Season\episode.mp4
    I believe after the update it started to copy and move files to different locations:
    \volume\iTunes\Artist\Album\tracks.mp3
    \volume\iTunes\Movies\movie.mp4
    \volume\iTunes\TV Shows\TV Show\episode.mp4
    Music is no longer being copied to the Music folder, it's being copied or moved to the root of where I have my iTunes directory defined.  Has anyone seen this change happen to them?

    Actually to get it to run through your library as it now exists I think the consolidate command is still around (I don't have itunes 10).
    How to Consolidate Your iTunes Library and Keep It Organized - http://www.switched.com/2010/11/02/itunes-consolidate-library-keep-organized/

  • I moved songs within my iTunes media folder and now my iPod can't find them

    Hello.  I have a few albums in my iTunes library that organize the artists by such folders as Artist feat. So-and-So.  This makes it difficult to scroll through artists on my iPod and in my car.  So I moved those songs that are in those folders to their corresponding album folder under the original artists' names.  Now when I try to sync my iPod it tells me that those songs cannot be found.  I completely restored my iPod and tried again after unchecking the following, but it still couldn't find the songs.
    Convert higher bit rate songs to X kbps AAC
    Keep iTunes Media folder organized
    Copy files to iTunes Media folder when adding to library
    Luckily I do still have the original CDs and can delete the albums then restore them, but I find this particular feature to be pretty ridiculous.
    Can anyone help?  Thanks in advance!

    The Macintosh has something called "file aliases" which allow you to move files from their original locations and applications that reference those files will still know how to find them. Windows does not have anything like that. It works off of full path / file names. So, when you moved your music folder and all your music in Windows Explorer, iTunes is still pointing to the old location.
    Here is the knowledge base article with the information on how to move your iTunes Music Library without these issues, <http://docs.info.apple.com/article.html?artnum=305451>

Maybe you are looking for

  • Mm02 - Sales text view update?

    Hi Friends, I am working on the material master change (i.e MM02 transaction) and I need to upload Material master u2013sales text view and purchase order text view and all other additional data views. I have updated one material in recording mode (i

  • Acrobat prof 7 save form data

    is there any option in Acrobat prof 7 that enable the save the form data in PDF.

  • Where do I find (Library/Receipts)?

    Where do I find (Library/Receipts)?

  • Oracle forms 6i error FRM-42401

    i have created a master detail module and when trying to run it, it doesn't come with data when clicking on "execute query" Instead it displays error "FRM-42401 Performing program trigger ON_CLEAR_DETAILS on form" can someone pls help to get rid of t

  • How to execute my procedure in OCI?

    I want to execute procedure in OCI.But it report ORA-28575,why? How to correct it? Below is my procedure: DECLARE B ORDSYS.ORDImage; BEGIN SELECT CONTENT INTO B FROM LXC.IMAGE WHERE ID=88 FOR UPDATE; B.setProperties; UPDATE LXC.IMAGE SET CONTENT = B