Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Copying files failed. The file name was invalid or too long

trying to set up iTunes transfer from old desktop to laptop. Consolidated files but stopped with the above iTunes error msg. Unsure on how to correct or change. Thanks for all help!

dell, Windows XP

Posted on Mar 17, 2015 8:06 AM

Reply
Question marked as Best reply

Posted on Mar 17, 2015 5:55 PM

The most likely cause for this is that your iTunes media folder is not in the standard location - on XP this will be C:\Documents and Settings\username\My Documents\My Music\iTunes\iTunes Media - and/or you don't have the first of these options checked in Edit > Preferences > Advanced:

User uploaded file

There are two limiting factors that apply here:


  • the maximum path length in Windows is 255 characters
  • when configured to organize files and folders within your library, iTunes will automatically truncate any files/folder names to 40 characters


With the default media folder location the longest possible path for music files is 156 characters + the length of your Windows username - will within Windows' limits. If, however:


  • you've configured iTunes to not keep the iTunes Media folder organized, and
  • your media folder is in a different location with a longer path name, and/or
  • the music that you're consolidating into it has some file or folder names that exceed 40 characters


then the fully qualified path that iTunes determines during consolidation may exceed the Windows 255-character limit. In most cases I suspect that checking the Keep iTunes Media folder organized option should be sufficient to avoid this error, unless your media folder is nested very deep in the Windows directory structure.

1 reply
Question marked as Best reply

Mar 17, 2015 5:55 PM in response to purvis

The most likely cause for this is that your iTunes media folder is not in the standard location - on XP this will be C:\Documents and Settings\username\My Documents\My Music\iTunes\iTunes Media - and/or you don't have the first of these options checked in Edit > Preferences > Advanced:

User uploaded file

There are two limiting factors that apply here:


  • the maximum path length in Windows is 255 characters
  • when configured to organize files and folders within your library, iTunes will automatically truncate any files/folder names to 40 characters


With the default media folder location the longest possible path for music files is 156 characters + the length of your Windows username - will within Windows' limits. If, however:


  • you've configured iTunes to not keep the iTunes Media folder organized, and
  • your media folder is in a different location with a longer path name, and/or
  • the music that you're consolidating into it has some file or folder names that exceed 40 characters


then the fully qualified path that iTunes determines during consolidation may exceed the Windows 255-character limit. In most cases I suspect that checking the Keep iTunes Media folder organized option should be sufficient to avoid this error, unless your media folder is nested very deep in the Windows directory structure.

Copying files failed. The file name was invalid or too long

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.