Home:ALL Converter>How to specify path in directory tree structure

How to specify path in directory tree structure

Ask Time:2017-03-21T00:14:25         Author:Victor Aguilar

Json Formatter

From subprocess import Popen, PIPE

process = Popen(['/home/hadoop/BackupFolders/','tree','.','-d'], stdout=PIPE, stderr=PIPE)
stdout, stderr = process.communicate()

Hello, I am trying to run these lines of code, to show the directory tree structure like Linux/Unix does. I've gotten the tree structure to show but only for the current working directory.

Every time I enter the path and run, it says access denied. I set the shell to true and false but it didn't work.

I want to be able to show the current working directory but also give the option to specify other paths.

Author:Victor Aguilar,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/42908649/how-to-specify-path-in-directory-tree-structure
yy