Skip to content

Commit

Permalink
Improve documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
epsitec committed Mar 27, 2015
1 parent 69a42ca commit 88119df
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,27 @@ and it will delete the specified folder and all of its contents. In order to
walk around limitations in the Windows API, we rename the folders to `@` on
the way down the tree in order to shorten the path names, so that we don't
get errors because the path exceeds 250.

## What's the matter?

When working with `npm` it is not unusal to get `node_modules` directory
trees which are very deep, with paths reaching lengths of 400 or more
characters.

Trying to delete these folders with the _Windows Explorer_ results in
error messages complaining about the fact that the _path is too long_ and
deletion becomes a nightmare.

To circumvent this problem, I've written this tiny naive tool which just
walks the folder structure, renames every folder to a one-character length
name while descending the tree, and then deletes everything while moving
back up the tree.

## I'm left with a folder called @

Sometimes, folders or files are in use (usually by the `explorer` process,
but this might also be the antivirus kicking in) and the tool cannot delete
or rename some folders or files.

Usually, the resulting folder structure has already been shortened enough so
that you can simply delete the remaining garbage with the _Windows Explorer_

0 comments on commit 88119df

Please sign in to comment.