2

i used yeoman to scaffolding angular project structure, but now i have problem to remove all contents under the root folder, there's this "node_modules" folder, i can't delete it. My OS is win7, does anybody know how to delete the project completely?

Aaron Shen
  • 8,124
  • 10
  • 44
  • 86
  • Do you get a permission error when you try to delete `node_modules` or something else? – Burhan Khalid Dec 09 '13 at 05:13
  • 1
    No, actually i got what the problem is. when i try to delete, windows prompt a dialog saying: the folder contains items whoses name is too long for recycle bin. win7 can't handle this, you can use 7-zip's file manager to delete them. – Aaron Shen Dec 09 '13 at 05:38
  • Press `SHIFT` and `DELETE` to skip the recycle bin and permanently delete the folder. – Burhan Khalid Dec 09 '13 at 05:39

6 Answers6

3

I encountered this same issue when I tried to remove a node based application on my own Windows 7 box. I used this tool to remove the folder.

http://www.osmstudios.com/projects/path-too-long

Its written in Java so that is the only requirement. Its free and open source.

https://github.com/DawsonG/PathTooLong

Gary Storey
  • 1,779
  • 2
  • 14
  • 19
  • For those out here who don't want to install Java, I've written a similar tool which is available from GitHub: https://github.com/epsitec/Tools-RecursiveDelete – Pierre Arnaud Mar 27 '15 at 06:01
1

This can be easily accomplished using the in-built Windows tool called robocopy which basically clones one directory into another. Create a new empty directory in the same location and use robocopy as shown below.

mkdir new_dir
robocopy /MIR new_dir long_name_dir
dshgna
  • 812
  • 1
  • 15
  • 34
0

Create a mapping to a drive letter.

subst x: C:\Folder1\Folder2\Folder3\Folder4\Folder5

Then go to x: and delete the files (they now have a smaller path)

Next delete the mapping

subst x: /D
agelbess
  • 4,249
  • 3
  • 20
  • 21
0

Use this tool is a java tool no install requiered and it works perfect

PathToLongLinkSoftware

Cesar Vega
  • 455
  • 6
  • 15
-1

When try to delete, windows prompt a dialog saying: the folder contains items whose name is too long for recycle bin. Win7 can't handle this, you can use 7-zip's file manager to delete them.

Aaron Shen
  • 8,124
  • 10
  • 44
  • 86
-1

if you have winrar installed in your pc then right click your app folder, click 'add to archive' option then tick the 'delete files after archiving', then delete the archived file. :)

pradeep
  • 11