Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

list all subdirectories up to a level

from glob import iglob

level3 = iglob('/home/backups/mysql/*/*/*')
level3_dirs = [x for x in level3 if os.path.isdir(x)]
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #list #subdirectories #level
ADD COMMENT
Topic
Name
2+8 =