Skip to content

ivanstefanov/CleanWorkingFiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CleanWorkingFiles

CleanWorkingFiles is a lightweight .NET console application for cleaning up automatically generated build and cache directories in .NET and frontend projects. It helps reclaim disk space by deleting folders like bin, obj, node_modules, and other build artifacts or cache files that are safe to remove.

Features

  • Reads configuration from a local config.json file (located next to the executable).
  • Recursively scans the specified root directory.
  • Deletes:
    • Directories listed in directoriesToDelete (e.g., bin, obj, node_modules).
    • Files matching extensions from extensionsToDelete (e.g., .log, .tmp).
  • Skips paths defined in excludePaths.
  • Shows a preview of all planned deletions before executing.
  • Requires explicit confirmation (YES) before removing anything.
  • Displays live progress while scanning and deleting.

Configuration (clean.json)

Example configuration file:

{
  "root": "C:\\Projects\\old",
  "directoriesToDelete": [
    "bin", "obj", "node_modules", "dist", "build",
    ".vs", ".idea", "_ReSharper.Caches", ".angular", ".next"
  ],
  "extensionsToDelete": [
    ".log", ".tmp", ".cache"
  ],
  "excludePaths": [
    "C:\\Projects\\old\\MySpecialProject",
    "C:\\Projects\\old\\Legacy\\DoNotTouch"
  ]
}
  • root -> the starting directory for the scan.
  • directoriesToDelete -> directory names to remove (matches by name, anywhere in the tree).
  • extensionsToDelete -> file extensions to remove (with or without dot).
  • excludePaths -> full paths that should be ignored (including their files and subdirectories).

Safety Notes

  • The tool never deletes without showing a full preview. Check carefully everything it would delete before confirmation!
  • You must type YES to confirm deletions.
  • Keep excludePaths up to date to protect sensitive directories.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages