The compression cannot be performed because the path to the file or directory 'Application Data' is too long

12,053

Solution 1

The problem is that "C:\Users\Administrator\AppData\Local\Application Data" is a NTFS junction point that points to "C:\Users\Administrator\AppData\Local". This causes an infinite loop in programs that do not specifically check for junction points.

Wikipedia actually mentions this very issue: http://en.wikipedia.org/wiki/NTFS_junction_point#General .

You should look for an archiver that understands junction points and has the option of not following them.

As a last resort, you can try temporarily deleting the junction point. But be careful, if you try to delete the folder as usual, you will end up deleting what it points to. And you may temporarily break stuff that relies on the junction point. The delection can be performed with (according to http://support.microsoft.com/kb/205524 ):

cd "C:\Users\Administrator\AppData\Local"
linkd "Application Data" /d

However, be aware that the junction point will then not be archived and will not be recreated when you extract the resulting archive.

Solution 2

There is a 1024-character maximum directory path length limit for ZIP files, which are clearly exceeding, so you are going to need to find a different method.

Depending on what you are trying to accomplish, I recommend just using the Windows backup program, which will also do compression into a bkf file, which compresses about a 2:1 ratio.

What specifically are you trying to accomplish, and maybe we can tell you a better way.

Solution 3

I believe the limitation is of the compression tool or format and not of the operating system, so you should try different compression tools and formats.

The free 7-Zip archiver supports a lot of formats, one of which will hopefully work. http://www.7-zip.org/

Share:
12,053

Related videos on Youtube

ITFan
Author by

ITFan

Updated on September 18, 2022

Comments

  • ITFan
    ITFan over 1 year

    In Windows 7, whenever I tried to compress the USER directory into a .zip file I experienced this error and cannot continue:

    The compression cannot be performed because the path to the file or directory 'Application Data' is too long.

    Is there any way to compress the USER directory?

  • hicklypups
    hicklypups almost 13 years
    P.S. Often the paths to things like files in your browser cache are extremely long. You could try deleting your caches for IE and Firefox, and trying again, as this may be where you are bombing out.
  • ITFan
    ITFan almost 13 years
    I try 7-zip and it shows error : 0 WARNING: The name of the file cannot be resolved by the system. 1 : C:\Users\Administrator\AppData\Local\Application Data\Application Data\Application Data\Application Data\Application Data\Application Data\Application Data\Application Data\Application Data\Application Data\Application Data\Application Data\Application Data It seems there is a infinite recursion
  • ITFan
    ITFan almost 13 years
    No luck with 7-Zip either. Errors: 0 WARNING: The name of the file cannot be resolved by the system. 1 : C:\Users\Administrator\AppData\Local\Application Data\Application Data\Application Data\Application Data\Application Data\Application Data\Application Data\Application Data\Application Data\Application Data\Application Data\Application Data\Application Data It seems there is a infinite recursion
  • hicklypups
    hicklypups almost 13 years
    @ITFan My guess is that it is just reporting the failures for long paths many times, but it is hard to say without really seeing it. Again, what are you trying to accomplish and why? I may be able to solve that question.