vss.dev·posts/commands-worth-keeping-around.md

Commands worth keeping around

This is a running list of small commands that solve annoying development workflow problems.

Stop Windows from content-indexing noisy folders

Some folders are useful to keep on disk but not useful to search through with Windows indexing. A good example is node_modules: thousands of dependency files that can make indexing noisier than it needs to be.

To tell Windows not to content-index a folder:

attrib +I "C:\folder\not\to\index" /S /D

What each part does:

  • +I sets the "not content indexed" attribute
  • /S applies it to files inside subfolders
  • /D applies it to folders too

This is especially useful for generated or dependency-heavy folders:

attrib +I "C:\path\to\project\node_modules" /S /D

This does not exclude the folder from OneDrive sync. It only tells Windows Search not to content-index those files.

main
● Open to work
Ln 1, Col 1
0 words
Markdown
UTF-8
--:--