8
3
I was running a node script that went awry and created a folder structure like so:
\myfolder
\myfolder
\file.txt
\myfolder
\file.txt
\myfolder
\file.txt
\etc.
This is nested to an extent of over 300 times, I would estimate, if not more.
I cannot del
it because it is too long a file path.
I cannot use robocopy
because it actually freezes around this point:
I cannot use FileAssassin
as it is only for files apparently.
I have tried using the .bat script from this answer How do I delete a folder which is nested quite deep and avoid "File name too long"? , and it is still running, but I fear at the level of recursion that the folder is at even if every single subfolder was renamed to one character it would still be longer than 260 (or whatever the limit is).
How do I remove this problem
from my filesystem?
EDIT
DeepRemove is successful! Victory! 3,421 levels of recursion. Jeesh! I'll be more careful with nodejs (or any programmatic modification of the filesystem) from now on, esp. when recursion is involved!
Did you try deleting the root folder? – and31415 – 2014-02-16T15:30:23.970
@and31415 yes. the file path is too long for windows to handle it itself. – Aristides – 2014-02-16T15:31:28.963
2Maybe someone will come up with a better solution, but what about booting on a GNU/Linux Live-CD, mounting the Windows partition and just
rm
'ing the problematic directory ? I think that Linux'es file path limit is way longer than Windows'es so it may work. – None – 2014-02-16T15:34:30.703@André that might work, but it is probably my last resort. – Aristides – 2014-02-16T15:41:36.577
@Aristides Yeah, just making sure. Now it would be interesting to know what actually created the problem in first place. – and31415 – 2014-02-16T15:42:13.417
@and31415 as I said, runaway nodejs script. Still not sure how :) – Aristides – 2014-02-16T15:42:46.677
@Aristides Have you got any source you can share? – and31415 – 2014-02-16T15:48:03.843
I was using this: https://github.com/btwael/mammouth and I believe I accidentally switched up the "compile" and "output" dirs causing some recursion glitch.
– Aristides – 2014-02-16T15:49:10.707@and31415 rmdir did not work. – Aristides – 2014-02-16T15:50:01.570
@and31415 Will try Linux live distro as last resort. – Aristides – 2014-02-16T15:57:00.590