Eclipse created a temp folder in one of the directories which is nested quite deep, e.g.
dir1\dir1\dir1\dir1\...
I am unable to delete this folder in Windows via Explorer, the del
or rmdir
commands, nor the Cygwin 'rm' command. How should I remove this very long folder?
It just keeps saying "File name too long…"
Best Answer
If you are like me and don't like to install additional software to fix a problem like this, I'd go with XQYZ's suggestion and use
robocopy
to solve the problem. (In my case the problem was created by robocopy in the first place, by copying a directory which had recursive junction points in it without supplying /XJ to robocopy).To delete the directory tree starting at c:\subdir\more\offending_dir:
The total step-by-step-process is as simple as this:
cd c:\subdir\more
to cd into its parent directory.mkdir empty
to create an empty directory.robocopy empty offending_dir /mir
to mirror the empty directory into the offending one.rmdir offending_dir
to get rid of the now empty offending directory andrmdir empty
to get rid of your intermediate empty directory.