Created
December 4, 2013 16:35
-
-
Save nkint/7790728 to your computer and use it in GitHub Desktop.
python as sh: print all the directory recursively
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, sys | |
rootdir = sys.argv[1] | |
for root, subfolders, files in os.walk(rootdir): | |
dirs = [ os.path.abspath(rootdir)+ root[1:] + "/" + s for s in subfolders ] | |
for d in dirs: print d |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment