I seem to have managed to get an Application Data folder recurse into itself somehow, doesn't look recursive but somehow still is and now I find myself unable to remove that folder. The folder itself is merely a subfolder in a backup folder from an old pc. It isn't used anymore in any way.
Current folder name is
C:\DWI00672\toremove\brhi\AppData\local
(I renamed Documents and Settings to toremove)
Following I have tried
Delete in explorer.
rmdir /s /q .
chkdsk
. This reports aWindows may not detect all cycles on your volume because the directory structure is too deep.
robocopy
to mirror an empty folder into the recursive one. This crashed robocopy with a stack overflow:STACK_OVERFLOW_c00000fd_Robocopy.exe!RoboPrune
Rename
Application Data
recursively tot
to shorten the path length. This stops with the message that the fully qualified name must be less than 260 characters$current = gci "C:\DWI00672\toremove\brhi\AppData\local" -Force while ($true) { $current.FullName if ($current.BaseName -ne "t") {Rename-Item -Path $current.FullName t -ErrorAction Inquire -Force } $current = gci "$($current.Parent.FullName)\t" -Force -ErrorAction Inquire }
Download
TeraCopy
and try it having remove the folder.subst
into the folder structure to furter shorten the path using the Powershell script. After driveK:
, I gave up.junction -s
from sysinterals but this finds no reparse points.dir /s c:\DWI00672\toremove\brhi\AppData\Local
is currently listing 330 Dir(s)dir /al /s c:\DWI00672\toremove\brhi\AppData\Local
to list the Reparse Points is returning File Not Foundrm -f -d c:\DWI00672\toremove\brhi\AppData\Local
from Cygwin executed as current user, administrator and as system (psexec -s -i cmd). The all returnrm: cannot unlink 'local': Not owner
. The owner of the Local folder is my current user.