Skip to content

socratespap/Directory-Scanner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“‚ Directory Scanner

A high-performance directory scanner that finds, sorts, and previews the largest files on your hard drive. Built with Python and PyQt6 for a modern, user-friendly experience.

Python PyQt6

πŸš€ Features

  • ⚑ High Performance: Optimized Python implementation for fast scanning
  • πŸ–₯️ Modern GUI: Beautiful PyQt6 interface with dark theme
  • πŸ“Š Smart Sorting: Automatically sorts files by size (largest first)
  • 🎯 File Type Filtering: Filter by Images, Videos, Archives, and Executables
  • πŸ“ˆ Progress Tracking: Real-time percentage-based progress bar
  • πŸ‘€ File Preview: Built-in text file preview functionality
  • πŸ—‘οΈ File Management: Delete files and directories directly from the interface
  • πŸ“€ Export Results: Save scan results to JSON format
  • πŸ”„ Cross-Platform: Works on Windows, Linux, and macOS
  • πŸ“¦ Standalone Executable: Ready-to-use .exe file included

πŸ“‹ Prerequisites

Required

  • Python 3.8+ with pip
  • PyQt6 for the GUI

πŸ› οΈ Installation

1. Clone or Download

git clone <repository-url>
cd "Directory Scanner"

2. Install Python Dependencies

cd python_frontend
pip install -r requirements.txt

3. You're Ready!

The application is now ready to use. You can either run the standalone executable or the Python script directly.

🎯 Usage

Standalone Executable (Recommended)

# Navigate to the executable
cd "python_frontend"
# Run the standalone application
"Directory Scanner.exe"

GUI Application (Development)

cd python_frontend
python main.py

πŸ“– How to Use

  1. Launch the Application

    • Double-click Directory Scanner.exe (standalone)
    • Or run python main.py (development)
  2. Select Directory

    • Click "Browse" to select a directory
    • Or type the path directly
  3. Configure File Filters (Optional)

    • Check "Images" for image files (.jpg, .png, .gif, etc.)
    • Check "Videos" for video files (.mp4, .avi, .mov, etc.)
    • Check "Archives" for compressed files (.zip, .rar, .7z, etc.)
    • Check "Executables" for executable files (.exe, .msi, .app, etc.)
    • Leave unchecked to scan all file types
  4. Configure Scan

    • Choose max results (100-10,000 files pr Unlimited files)
    • Click "Start Scan"
    • Watch the real-time progress bar
  5. View Results

    • Files are automatically sorted by size
    • Click any file to preview its contents
    • Use the table headers to sort by different criteria
  6. Export Results

    • Click "Export Results" to save as JSON
    • Choose your preferred location

πŸ—οΈ Project Structure

Directory Scanner/
β”œβ”€β”€ πŸ“„ README.md                  # This file
β”œβ”€β”€ πŸ“„ run.bat                    # Windows batch script
β”œβ”€β”€ πŸ“„ run.sh                     # Unix shell script
β”œβ”€β”€ πŸ“„ test_scanner.py            # Test utilities
└── πŸ“ python_frontend/           # PyQt6 GUI application
    β”œβ”€β”€ πŸ“„ Directory Scanner.exe  # Standalone executable (ready to use)
    β”œβ”€β”€ πŸ“„ main.exe              # Build artifact
    β”œβ”€β”€ πŸ“„ requirements.txt      # Python dependencies
    β”œβ”€β”€ πŸ“„ main.py              # Main GUI application
    β”œβ”€β”€ πŸ“„ main.spec            # PyInstaller configuration
    β”œβ”€β”€ πŸ“ build/               # Build artifacts
    └── πŸ“ dist/                # Distribution files

βš™οΈ Configuration

Performance Tuning

Python Implementation:

  • Optimized file system operations
  • Efficient memory usage
  • Real-time progress tracking
  • Suitable for directories of all sizes

Customization

Edit python_frontend/main.py to customize:

  • Default scan limits
  • UI themes and colors
  • File preview formats
  • Export options

πŸ”§ Building for Distribution

Create Standalone Executables

Python Application:

cd python_frontend
pip install pyinstaller
pyinstaller --onefile --windowed main.py
# Executable: dist/main.exe (Windows)

Cross-Platform Builds

Windows:

pyinstaller --onefile --windowed main.py

Linux:

pyinstaller --onefile --windowed main.py

macOS:

pyinstaller --onefile --windowed main.py

πŸ› Troubleshooting

Common Issues

"No module named 'PyQt6'"

pip install PyQt6

"Permission denied" errors

  • Run as administrator (Windows) or with sudo (Linux/macOS)
  • Check directory permissions

Slow scanning performance

  • Reduce the max results limit
  • Scan smaller directory trees
  • Close other applications to free up system resources

Performance Comparison

Directory Size Scan Time Memory Usage
Small (1K files) ~1 second ~30MB
Medium (10K files) ~5 seconds ~50MB
Large (100K files) ~30 seconds ~100MB

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Test thoroughly
  5. Submit a pull request

Development Setup

# Install development dependencies
cd python_frontend
pip install -r requirements.txt
pip install pytest black flake8

# Format code
black main.py

# Run tests
pytest

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • PyQt6 for the excellent GUI framework
  • Python Community for amazing libraries and tools
  • PyInstaller for making standalone executables possible

πŸ“Š Roadmap

  • Add file type filtering (Images, Videos, Archives, Executables)
  • Real-time progress tracking with percentage display
  • Standalone executable distribution
  • Modern dark theme UI
  • Implement duplicate file detection
  • Add directory size visualization
  • Create installer packages
  • Add network drive support
  • Implement file operations (delete files and directories)
  • Add file hash calculation
  • Implement search functionality

Made with ❀️ using Python

This app is created by https://socratisp.com

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors