Greetings I would like to get a graphic type tree from my folders and their respective files with python
I currently have the following code:
rootDir = 'media/gestionDocumental/'
directorioArr=[]
for dirName, subdirList, fileList in os.walk(rootDir):
#print('Found directory: %s' % dirName)
nombreAbsoluto=dirName.split("/")
directorioArr.append(nombreAbsoluto[2])
for fname in fileList:
#print('\t%s' % fname)
directorioArr.append(fname)
which gives me the following result:
How can I improve this method .. Thanks in advance!