Saturday, July 18, 2015

file management - Windows 7 Delete heavily nested folder structure



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:


enter image description here


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!


Answer



I have not tried this software but you may want to review it and give it a go.


https://deepremove.codeplex.com/


Good Luck.


No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...