Deleting files and folders when ‘File or path name too long’

At Deepend, we’ve recently come across some issues with Node.JS modules that have stupidly deep dependency trees.

Once Node was done, we then encountered issues deleting the stupidly deep dependency trees.

As a quick work-around, I discovered the following solution:

mkdir \empty
robocopy \empty node_modules /MIR
rmdir \empty

Leave a Reply

Your email address will not be published. Required fields are marked *