When I started working with AngularJS application and YoMan code generator, I face a problem in deleting folders. I was using windows operation systems. Windows was complaining that the file names are too long.

After my initial search on internet I learned the workaround. Idea, was to rename the file name with short name. For example I renamed the foler from ‘array-find-index’ to ‘1’, once it reach to the 255 character limit I can delete that folder. However, there are many files in my folders and I have to go in deep to the the tree to rename the folders. This was boaring and time consuming activity.

The best solution I found is to use the node.js package namely rimraf.
You need to install it using the below command

npm install -g rimraf

and use it like this


This works awesome and saved my lot of efforts.

Please let me know if you face any issues to use this. I will be more than happy to help you out.

How to Delete Folder having very long file names
Tagged on:             

Leave a Reply

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