0
How to Create the Tree View for the Google Drive

If we never worked with DOS/ Linux before, we will be familiar with the “tree” command that recursively lists all the files and folders in the current directory in a tree format. Mostly we prefer visual navigation through Windows Explorer/ Mac Finder but we can save and print the directory structure and it is the unique advantage with the tree command.


Tree Command for the Google Drive 

If we have written a Google Script that is running “tree” but against the Google Drive. It creates a hierarchical tree diagram of all the files and folders in the Google Drive that we can save for offline reference/ print.


Click here to start and authorize the script to access the files in Google Drive. Once the authorization is complete, with in minute it generates the entire Google Drive tree. Then You will get a link to download an HTML file that mirrors the structure of Drive. Directly You can send the file to the printer also.

Internally all this script is recursive traversal and the tree itself is sylized through simple CSS. In the present version, only the folder names in the tree are linked to corresponding location in Google Drive though the script and can be easily extended to create a more data-rich tree that includes details like file URLs, sharing permissions, file sizes, file types etc.

If you have a large drive with tons of file and folders the process will take slightly long time. As soon as you authorize the Google Drive Tree script, you will get an email from Google with instructions how to revoke the access. You can do this as soon as the tree has been generated.

Post a Comment

 
Top