I had a folder on my 64-bit Windows 7 Home Premium backup drive named
You get the idea. When I tried to delete this folder using Windows Explorer. I received the following message:
I believe that it was caused by a symbolic link in my home folder (more precisely, my lack of understanding as to how symbolic links work in the Windows environment).
To “trick” a backup application that supported only local backups, I used a symbolic link to point to a backup folder on a second hard drive (D:). Turns out when the backup application reached the symbolic link, it copied to the backup folder and began to back up the backup folder to the backup folder. The result (in my case) was the AppData folder copied onto itself recursively until…you guessed it…the path names grew larger than is supported by the file system.
Fortunately, the solution is quite simple. The link below points to the solution I found on the WindowsIT Pro site, but save yourself some time. The solution is here:
1. Create a dummy folder on the drive (D: in this example) where the elongated path lives:
2. Copy the dummy folder to the mutant folder using the /MIR (mirror) command line switch:
robocopy D:\AnyFolder D:\BackupFolder /MIR
3. Let RoboCopy clean up the fouled folder. This could take a few minutes depending on the size of the folder.
4. Remove the fixed folder and the dummy folder:
rd /s D:\BackupFolder
rd /s D:\AnyFolder
That’s it. You are good to go.
RoboCopy’s /MIR switch tells it to mirror the source folder to the target folder. This means that RoboCopy purges any folders and files that do not match the source folder structure and content, therefore all that is contained in the backup folder when RoboCopy completes is D:\BackupFolder\AnyFolder.
Credit where credit is due: http://www.windowsitpro.com/article/jsifaq/jsi-tip-9651-how-can-i-delete-a-folder-that-returns-path-too-long-