A Python tool for analyzing directory structures, finding duplicate files, and managing file organization.
- Find duplicate files based on content hash
- Interactive mode for managing duplicates
- Tree view visualization of directory structure
- Export results to file
- Configurable worker threads for parallel processing
-
Clone the repository:
git clone https://github.com/yourusername/file-tree-py.git cd file-tree-py -
Install in development mode:
pip install -e .
There are two ways to use the File Tree Analyzer:
Simply run the program without arguments:
python main.pyThe program will prompt you to enter a directory path. You can:
- Type '.' for the current directory
- Paste a full directory path
- Press Ctrl+C to exit
For more advanced usage, you can provide arguments directly:
python main.py [directory] [options]Options:
-w, --workers N: Set number of worker threads-i, --interactive: Enable interactive mode for managing duplicates--no-tree: Disable tree view visualization--export FILE: Export results to specified file--config FILE: Use custom configuration file-v, --verbose: Enable verbose logging-h, --help: Show help message
Examples:
# Analyze current directory
python main.py .
# Analyze specific directory with verbose logging
python main.py /path/to/directory -v
# Enable interactive mode
python main.py . -i
# Export results to file
python main.py . --export report.txtYou can customize the behavior by creating a JSON configuration file:
{
"similarity_threshold": 0.8,
"exclude_patterns": ["__pycache__", "*.pyc"],
"max_depth": 5,
"include_hidden": false,
"num_workers": 4
}Use the config file with:
python main.py . --config myconfig.jsonThis project is licensed under the MIT License - see the LICENSE file for details.