Skip to content

Instantly share code, notes, and snippets.

@GeekaholicLin
Last active June 9, 2016 13:19
Show Gist options
  • Save GeekaholicLin/4c90da786ec0dc1c98017054848bcbab to your computer and use it in GitHub Desktop.
Save GeekaholicLin/4c90da786ec0dc1c98017054848bcbab to your computer and use it in GitHub Desktop.
How to delete directories with path/names too long for normal delete

#############如何在windows下删除文件名过长的文件##########

from the website http://superuser.com/questions/78434/how-to-delete-directories-with-path-names-too-long-for-normal-delete#answer-776859

None of the other (free) answers here worked for me, but I found one on another site:

rimraf <dir>

rimraf is a Node.js package, so you will need to install Node.js which includes npm. Then you can run:

npm install -g rimraf

Then you can run rimraf from the command line.

I found this solution because npm itself was causing this problem due to the way it nests dependencies. By the way, rimraf gets its name from the UNIX command rm -rf, which recursively deletes files and folders.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment