https://github.com/babak2/print-directory-tree
https://github.com/babak2/print-directory-tree
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/babak2/print-directory-tree
- Owner: babak2
- Created: 2024-03-04T10:53:40.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-03-07T00:40:19.000Z (over 2 years ago)
- Last Synced: 2025-02-01T19:45:12.204Z (over 1 year ago)
- Language: Python
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Print Directory Tree
This Python command-line program prints the underlying directory tree structure to the standard output (console/ terminal).
## Usage
- Ensure you have Python 3 installed on your system.
- Extract the contents of the zip file to a location on your computer.
- Open a terminal or command prompt.
- Navigate to the directory containing the print_dir_tree.py script.
- Run the script with the following command:
- If Python 3 is the only Python version installed on your machine, you can use the python command. For example:
`python print_dir_tree.py `
- If both Python 2 and 3 are both installed, it's important to specify Python 3 using the python3 command. For example:
`python3 print_dir_tree.py `
Replace with the path to the directory whose tree structure you want to print.
- The program will display the directory tree structure, showing directories suffixed by a trailing slash ('/') and files contained within each directory.
### Example
Running the program with the command:
`python3 print_dir_tree.py path`
will produce the following output:
```
path/
subdir1/
buzz
fizz
subdir2/
foo
subsubdir1/
```