Saturday, August 15, 2015

windows 7 - Force delete files with a rather large name


I regularly use Node.js to manage dependencies for programs I write, no big deal. Today I ended up with a folder structure like this: enter image description here


Trying to delete any file was met with this error:



The source file name(s) are larger than is supported by the file
system. Try moving to a location which has a shorter path name, or try
renaming to shorter name(s) before attempting this operation.



It was already in C:\, so it wasn't going to get much shorter.


Answer



I started typing this problem while trying a multitude of commands, including del /F and rmdir /S (as well as holding shift while deleting to try to bypass the recycle bin). I think that rmdir /S actually deleted all of the files so I was able to proceed with deleting the folders that were leaf nodes, then progressing up the tree a few nodes at a time. Eventually I cleaned them all up, but that was ridiculous.


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...