Created
October 4, 2013 11:26
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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