Created
March 10, 2018 00:41
-
-
Save bryanbuchanan/f79ce1d8efb152d5ed02a2a9f78a97a6 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
import os | |
import sys | |
directory = os.path.dirname(os.path.realpath(sys.argv[0])) | |
for dirpath, dirnames, files in os.walk(directory): | |
if not files: | |
os.rmdir(dirpath) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment