6

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?

3 Answers 3

5

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.

0
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.

4
  • 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.
    – KCotreau
    Jul 18, 2011 at 15:06
  • 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
    Jul 18, 2011 at 18:51
  • 2
    @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.
    – KCotreau
    Jul 18, 2011 at 23:11
  • I just want to compress my user directory for backing up some preferences of some programs then I can restore it after installing Windows.
    – ITFan
    Jul 19, 2011 at 18:38
1

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/

1
  • 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
    – ITFan
    Jul 18, 2011 at 18:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .