Skip to content

Instantly share code, notes, and snippets.

@mcmarto
Created October 4, 2013 11:26
Show Gist options
  • Save mcmarto/6824505 to your computer and use it in GitHub Desktop.
Save mcmarto/6824505 to your computer and use it in GitHub Desktop.
List directories mentioned in Windows PATH which no longer exist on the filesystem
#!/usr/bin/python
import os
path = os.getenv('PATH')
pathlist = path.split(';')
print "Missing Directories listed in PATH\n"
for pathelement in pathlist:
if not(os.path.isdir(pathelement)):
print pathelement
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment