Skip to content

mozhaa/path-cleanup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Path CleanUp

Windows only

Overview

Tool for deleting reduntant paths from PATH environment variable. Redundant paths include:

  • non-existing paths
  • duplicates
  • empty folders

Requirements

  • Python 3.x
  • [optional] termcolor (for colored output)

Usage

python pathcleanup.py [-h] [-D {0,1,2}] [-y] [-s {user,system,all}]

options:
  -h, --help            show this help message and exit
  -D {0,1,2}            which folders to delete from PATH
                         0 - don't delete anything (default option)
                         1 - delete non-existing folders
                         2 - delete non-existing and duplicate folders
                         3 - delete non-existing, duplicate and empty folders
  -y                    skip confirmation when deleting
  -s, --scope {user,system,all}
                        which PATH variables to modify
                         user   - user-specific
                         system - system-wide
                         all    - both of these

Administrator rights

When modifying system-wide PATH vatiable (--scope system), script needs to be runned as administrator (right-click cmd.exe and select Run as administrator).

Example

Screenshot

About

Tool for deleting redundant paths from PATH environment variable

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages