Skip to content

Commit 88119df

Browse files
committed
Improve documentation.
1 parent 69a42ca commit 88119df

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,27 @@ and it will delete the specified folder and all of its contents. In order to
1010
walk around limitations in the Windows API, we rename the folders to `@` on
1111
the way down the tree in order to shorten the path names, so that we don't
1212
get errors because the path exceeds 250.
13+
14+
## What's the matter?
15+
16+
When working with `npm` it is not unusal to get `node_modules` directory
17+
trees which are very deep, with paths reaching lengths of 400 or more
18+
characters.
19+
20+
Trying to delete these folders with the _Windows Explorer_ results in
21+
error messages complaining about the fact that the _path is too long_ and
22+
deletion becomes a nightmare.
23+
24+
To circumvent this problem, I've written this tiny naive tool which just
25+
walks the folder structure, renames every folder to a one-character length
26+
name while descending the tree, and then deletes everything while moving
27+
back up the tree.
28+
29+
## I'm left with a folder called @
30+
31+
Sometimes, folders or files are in use (usually by the `explorer` process,
32+
but this might also be the antivirus kicking in) and the tool cannot delete
33+
or rename some folders or files.
34+
35+
Usually, the resulting folder structure has already been shortened enough so
36+
that you can simply delete the remaining garbage with the _Windows Explorer_

0 commit comments

Comments
 (0)