Folder Content Reader is a simple Python utility that recursively scans a selected directory, extracts the contents of all readable text files, and compiles them into a single output file.
It is designed to be developer-friendly, offering an easy way to "dump" codebases or document structures for analysis, backups, or LLM prompting.
- Python 3.x installed on your system.
- No external pip packages required (uses standard libraries:
os,json,tkinter).
-
Run the script:
python main.py
-
Select Folder: A popup window will appear (check your taskbar if it doesn't pop up immediately). Navigate to and select the folder you want to read.
-
Wait for Process: The script will scan the folder and print its progress to the console.
-
View Output: Open the newly created
combined_output.txtfile in the project directory. This file contains the paths and contents of every readable file found.
On the first run, the script automatically generates a config.json file. You can edit this file to customize behavior.
Configuration Options:
- output_file: Define where the result is saved. Can be a filename (
"my_dump.txt") or a full path ("C:/Users/Me/Desktop/dump.txt"). - ignore_folders: Skip entire directories (e.g.,
node_modules). - ignore_extensions: Skip file types (e.g.,
.exe,.png). - ignore_files: Skip specific filenames (e.g.,
.gitignore,package-lock.json).
Default Example:
{
"output_file": "combined_output.txt",
"ignore_folders": [
".git",
"node_modules",
"__pycache__",
"venv",
".idea",
".vscode",
"dist",
"build"
],
"ignore_extensions": [
".exe", ".dll", ".bin",
".png", ".jpg", ".jpeg", ".gif", ".ico", ".svg",
".zip", ".rar", ".pdf", ".tar", ".gz",
".pyc", ".pkl"
],
"ignore_files": [
".gitignore",
".gitattributes",
"package-lock.json",
"yarn.lock",
".DS_Store",
"config.json"
]
}