Folder Reader is a command-line tool that helps you analyze and understand your directory structures. It provides detailed information about files and folders in a specified directory, making it easier to manage and organize your files.
This Python script reads the directory structure of a given folder and outputs the folder hierarchy in both Markdown and Plain Text formats. The generated files are saved into separate directories (result_md
for Markdown and result_txt
for plain text).
-
Recursively lists the contents of a directory, including subdirectories.
-
Outputs directory structure with proper indentation.
-
Saves the structure in both Markdown (
.md
) and Plain Text (.txt
) formats. -
Automatically handles duplicate filenames by appending a unique identifier.
-
Creates a
result_md
folder for Markdown files and aresult_txt
folder for text files.
- Clone this repository and navigate to the directory:
git clone https://github.com/ryshaal/folder-reader.git
cd folder-reader
- Run the script:
python list_directory.py
or
python list_directory_v2.py
- Input the folder path when prompted:
Masukkan alamat folder yang ingin dibaca: /path/to/folder
- The script will generate two output files:
-
A
.md
file in theresult_md
directory. -
A
.txt
file in theresult_txt
directory.
The files will be named with the format Directory structure <folder_name> <date>.md
and Directory structure <folder_name> <date>.txt
.
For a directory with the following structure:
my_folder/
├── sub_folder1/
│ └── file1.txt
├── sub_folder2/
└── file2.txt
The output will be:
# Directory Structure for my_folder
📁 my_folder
- 📁 sub_folder1
- 📄 file1.txt
- 📁 sub_folder2
- 📄 file2.txt
Directory Structure for my_folder
my_folder
- [Folder] sub_folder1
- [File] file1.txt
- [Folder] sub_folder2
- [File] file2.txt
- Python 3.x
- Fork the repository
- Create your feature branch (
git checkout -b feature/YourFeature
) - Commit your changes (
git commit -m 'Add some feature'
) - Push to the branch (
git push origin feature/YourFeature
) - Open a Pull Request
This project is licensed under the MIT License.