The second simplest visual approach (after ls -R) is in the Terminal using a script that I offer here:
#!/bin/zsh
: <<"COMMENT"
Create a folder hierarchy tree diagram by providing the starting folder name
as an argument to this script. Can be relative, tilde, or absolute path.
Usage: ./treex.zsh ~/Desktop/SampleFolder
Credit: Alice Purcell, https://stackoverflow.com/questions/14223233/list-all-directories-recursively-in-a-tree-format
COMMENT
STARTDIR="${1:a:s/\~\//}"
find "${STARTDIR}" -type d -print | sed -e 's;[^/]*/; /;g;s;/ ; ;g;s;^ /$;.;;s; /;|-- ;g' |\
cut -c 12-
exit 0
You copy and paste the above content into a plain text file and save it as treex.zsh on your Desktop. Then in the Terminal, you want to make it executable and run it:
cd ~/Desktop
/bin/chmod +x ./treex.zsh
./treex.zsh /path/to/folder > tree.txt
You now have a text file on your Desktop that you can click on and press the space bar to view using the Finder's Quick Look feature.
The output will appear nested like the following to show the folder and file hierarchy:
