7 Replies Latest reply: May 7, 2013 11:42 AM by turingtest2
stain3565 Level 1 Level 1 (0 points)

Due to some complicated circumstances regarding setting up a new laptop and copying my iTines media files across, I have created the following situation:

 

1. All files are under a folder called iTunes/iTunes Media in their appropriate folders e.g. iTunes/iTunes Media/Beatles

 

2. All of these files have been duplicated in a sub folder called iTunes/iTunes Media\Music e.g.  iTunes/iTunes Media/Music/Beatles

 

At some point, and due to some jiggery pokery on my part that I cannot remember, I have iTunes pointing to a mixture of these i.e. some albums are located in the ITunes Media folder and some in the Music sub folder

 

I need to remove the duplicate folder  to free up space on my laptop so would like to simply globally change any reference in locvations of iTunes/iTunes Media\Music to iTunes/iTunes Media\Music

 

This would solve my issue rather than trawl through thousands of missing location files and individually changing these. is this possible at the database level?


Windows 8
  • 1. Re: Can I globally change the itunes folder names
    turingtest2 Level 8 Level 8 (46,590 points)

    Rather than delete anything by hand I suggest you start by fixing the broken links with my script FindTracks.

     

    You could then import the iTunes Media folder to reattach any orphaned files to the library.

     

    You can then dedupe with my DeDuper script. See this thread for background and please take note of the warning to backup your library before deduping (actually that should be the first thing you do).

     

    Finally turn Keep organize... off, then turn it back on again. Also make sure under File > Library > Organize Library that Reorganize files in the folder iTunes Media is greyed out. If not, tick the box and press OK.

     

    The aim is to end up with the library set out as described in make a split library portable.

     

     

    tt2

  • 2. Re: Can I globally change the itunes folder names
    stain3565 Level 1 Level 1 (0 points)

    FindTracks did most of the work so there was no need for running DeDuper.

     

    Thanks for the script. I did add a messagebox to display the missing file details as iTunes is not the best for grouping these together to identify them.

     

    Might be a potential improvement???

     

    Once again, thanks fo the very useful script

  • 3. Re: Can I globally change the itunes folder names
    turingtest2 Level 8 Level 8 (46,590 points)

    stain3565 wrote:

     

    I did add a messagebox to display the missing file details as iTunes is not the best for grouping these together to identify them.

     

    Tell me more... There is an exisiting system to prompt when the script can't tell which of two or more potenial matches is the correct file. Otherwise, once it gets going, the script is really to designed to correct multiple files without further user interaction so that it can work quickly.

     

    tt2

  • 4. Re: Can I globally change the itunes folder names
    stain3565 Level 1 Level 1 (0 points)

    It was nothing more than a prompt when a file was actually missing, not when 2 potential files cropped up (I saw that prompt with a couple of iTunes tracks and selected the appropriate one).

     

    If a file is actually missing, your script just outputs the count (variable M) when the scan is completed. believe me, my code change was the bare minimum change, just a message box outputting title, artist and album when the variable M is incremented. Nothing very smart but may be worthwhile adding these fields to a recordset and giving the option of displaying the list at the end of the FindTracks code.

     

    The reason I added this was because my first full track search gave me a count of 20 odd missing (partly to do with my attempts to tidy up my initial issue with my transferred data files, including initially not realising that a transfer had not overwritten existing files but given duplicates unique names... I had simply removed the obvious duplicates myself i.e. ending in an incremented file value of "2" without realising that this had included filesgenuinely with 2 in the name such as Blur's Song 2... complicated explanation but the simple fact was I had actually files missing at this point).

     

    I simply added the message box for each as a quick and dirty method of finding these in Itunes so that I could restore the individual files but a recordset/array would seem a better option given potentially large numbers.

     

    I did have some code somewhere that could copy such lists to the clipboard which I guess could also be useful but this is probably adding too much functionality.

     

    Can I just finish by saying your code was great and has saved me hours of messing about so thanks.

  • 5. Re: Can I globally change the itunes folder names
    turingtest2 Level 8 Level 8 (46,590 points)

    Ah got you. I will bear it in mind next time I'm tweaking the script.

     

    And you're welcome.

     

    tt2

  • 6. Re: Can I globally change the itunes folder names
    stain3565 Level 1 Level 1 (0 points)

    May I just ask a question about Deduper?

     

    I am unsure as to whether I need to run this but given the fact that I found I had many physical suplicates within folders and I attempted to move the obvious ones, there is a possibility that under albums, I may have some duplicates within iTunes.

     

    The issue I have is that I am happy for some tracks to be in different albums as I would like to maintain the integrity of albums.

     

    For example:

     

    Say I have the following under David Bowie > Aladdin Sane:

     

    Track 9: The Jean Genie   Time: 4:07   File: ...iTunes Media/Davis Bowie/Aladdin Sane/09 The Jean genie.mp3

    Track 9: The Jean Genie   Time: 4:07   File: ...iTunes Media/Davis Bowie/Aladdin Sane/09 The Jean genie 2.mp3

     

    Also under David Bowie > Changesbowie:

    Track 6: The Jean Genie   Time: 4:07   File: ...iTunes Media/Davis Bowie/Changesbowie/09 The Jean genie.mp3

     

    I would obviously want one of the Track 9's on Aladdin Sane to go, as these will be identical duplicates within the same album, but do not want the Changesbowie track to go. I was not sure that DeDuper would do this, even though I read descriptions on your threads and the web page. Sorry... just got a bit confused as to the phases and duplicate types.

     

    Does it do these automatically or is it interactive so that I am asked before a deletion occurs?

     

    I know the backup option should ensure there are no issues but my iTunes is over 40GB of my entire record collection over my lifetime, so I would be wary of just going aheda and having to restore.

     

    Sorry for bothering you about this.

  • 7. Re: Can I globally change the itunes folder names
    turingtest2 Level 8 Level 8 (46,590 points)

    No problem.

     

    In iTunes View > Show Duplicate Items would list those three copies of The Jean Genie as they all have the same Name and are by the same Artist. In contrast Shift > View > Show Exact Duplicate Items would only list the first two as they have the same Name, Artist, Album, Track No. and Disc No. My script makes the same distinction as you or I would (even if you try to apply it all three tracks) and is only intended to weed out extra copies of exact duplicates. In general it will keep the older or best quality (largest) copy and merge ratings, playcounts and playlist membership so nothing is lost.

     

    There is a confirmation pop-up before the duplicates are actually removed, but since the aim is to allow for potentially 1,000s of duplicates to be deleted efficently there is no track by track confirmation. Test it by selecting a small set of tracks such as all copies of The Jean Genie to see how it behaves.

     

    Sorry the thread is a bit long and rambling, but the task of cleaning duplicates is by no means trivial.

     

    tt2