In Windows CMD, I use
tree c: /f to get a tree of all directories resided in C:. But now I only want to tree out the only sub-directory folders (not files). How to I exclude files in tree command?
tree works for showing all files and folders on Windows. The command
tree -d does directories only on Windows. So yes, it does work.
tree -a shows ALL FILES/DIRECTORIES, including hidden ones. You can combine them like this:
tree -a -d in the terminal. This works on Git Bash and on Command Prompt but requires
tree.exe placed in Git Bash's bin folder (
C:\Program Files\Git\usr\bin). For more information on Tree's installation for Windows, see this article on installation.
Good luck and happy programming.