HT201625: Manage and back up your iTunes media library

Learn about Manage and back up your iTunes media library
jslfromnyc

Q: Error Message

When I consolidate files on a windows pc, I get an error message saying "Copying files failed. The filename was invaled or too long." Is there any way around this? Thank you!

Posted on Jun 5, 2016 1:38 PM

Close

Q: Error Message

  • All replies
  • Helpful answers

  • by jslfromnyc,

    jslfromnyc jslfromnyc Jun 5, 2016 1:39 PM in response to jslfromnyc
    Level 1 (4 points)
    iTunes
    Jun 5, 2016 1:39 PM in response to jslfromnyc

    I thought it would add it, but I am in this article: support.apple.com/en-us/HT201625

  • by hhgttg27,Helpful

    hhgttg27 hhgttg27 Jun 5, 2016 1:56 PM in response to jslfromnyc
    Level 5 (5,407 points)
    iTunes
    Jun 5, 2016 1:56 PM in response to jslfromnyc

    What is the path of the iTunes Media folder that you are consolidating to?  Do you have iTunes' "Organize files ..." option enabled or disabled?

     

    The most likely cause of this issue is that combination of the media folder path, folder names, and file names is exceeding Windows' limitation on absolute path names (255 characters).  If you have the "Organize files ..." option enabled iTunes will automatically truncate folder and file names to 30 characters.

  • by jslfromnyc,

    jslfromnyc jslfromnyc Jun 5, 2016 1:55 PM in response to hhgttg27
    Level 1 (4 points)
    iTunes
    Jun 5, 2016 1:55 PM in response to hhgttg27

    I don't know what you mean by path. Also, I don't know if I have the organize files function enabled. Can you help me find it? Thanks again.

  • by jslfromnyc,

    jslfromnyc jslfromnyc Jun 5, 2016 2:00 PM in response to hhgttg27
    Level 1 (4 points)
    iTunes
    Jun 5, 2016 2:00 PM in response to hhgttg27

    If by path you mean how I got to consolidate files, I clicked on File > Library > Consolidate library

  • by hhgttg27,Helpful

    hhgttg27 hhgttg27 Jun 5, 2016 2:12 PM in response to jslfromnyc
    Level 5 (5,407 points)
    iTunes
    Jun 5, 2016 2:12 PM in response to jslfromnyc

    They are settings in Edit > Preferences > Advanced.

  • by jslfromnyc,

    jslfromnyc jslfromnyc Jun 5, 2016 2:06 PM in response to hhgttg27
    Level 1 (4 points)
    iTunes
    Jun 5, 2016 2:06 PM in response to hhgttg27

    To clarify, I select Keep Itunes Media Folder Organized. Also, This is my Dad's music, so by doing that, will it change the names of the song in iTunes, or just in the file? (To clarify, will anything change for my dad?) (My dad would go crazy.)

  • by hhgttg27,

    hhgttg27 hhgttg27 Jun 5, 2016 2:48 PM in response to jslfromnyc
    Level 5 (5,407 points)
    iTunes
    Jun 5, 2016 2:48 PM in response to jslfromnyc

    When you Consolidate your iTunes library, it copies any media that's referenced from your iTunes library from its current location to the standard iTunes Media folder structure, as specified in the iTunes Media folder location setting in Edit > Preferences > Advanced.

     

    There are two scenarios where this is typically used:

     

    • you have media files stored outside the iTunes Media folders and want to have everything inside those folders - in this case you don't change the iTunes Media folder location setting, and the only files affected will be those not currently in specified iTunes Media folder.
    • you want to change the location in which your iTunes media is stored (e.g., migrating from your system drive to an external hard drive) - in this case you first change the iTunes Media folder location setting in Edit > Preferences > Advanced to the new location, and all files (whether inside or outside the current media folders) will be copied.

     

    The "Keep iTunes Media folder organized" determines whether iTunes modifies file and folder names during library operations (this always applies for CD import and iTunes Store purchases, so it really only affects media added using drag-and-drop or File > Add file/folder to Library... functions.  When "Keep ..." is enabled, the Consolidate will change any existing folder and file names that don't match iTunes' standard naming scheme:

     

    • the files making up each album will be placed in media_folder_path\Music\artist\album_title, except those for which the "Album is a compilation ..." flag is set, which use media_folder_path\Music\Compilations\album_title
    • the files placed with these folders will be named track_number song_title.extension for single-disc albums or disc_number-track_number song_title.extension for multi-disc album
    • if the values for Artist, Album or (song) Name stored in the iTunes database exceed 30 characters, they will be truncated to 30 characters when deriving folder and file names

     

    Note that this only affects storage locations, nothing will change to the way in which your music is presented through the iTunes UI.

     

    If you have the "Keep iTunes media folder organized" option selected then its highly unlikely that the error you are seeing is the result of Windows' maximum path length being exceeded (it would mean that your specified iTunes Media folder location setting around 150 characters.  Although the error message you quote references an "invalid filename" I wouldn't normally expect to see this during consolidation as iTunes will automatically replace any of the characters that can't be used in Windows' file or folder names by "_".

     

    Are you able to determine which media files are causing the problem?  It would also help to know specifically what you're using the Consolidate function to achieve.