A tool for managing and organizing files in a directory
Project description
FileSweep
FileSweep is a powerful tool for managing, scanning, and organizing files in directories. It offers both file scanning with multiple export formats and pattern-based file cleaning capabilities.
Installation
pip install filesweep
Features
- File Scanning: Scan directories to collect detailed file information
- Multiple Export Formats: Export file data in JSON, CSV, or XML format
- Pattern-Based Cleaning: Remove files matching specific patterns
- Command Line Interface: Easy-to-use CLI for all operations
- Python API: Can be used as a library in your Python projects
Usage
Command Line Interface
Scanning files and exporting data
# Export file data to JSON (default)
filesweep scan /path/to/directory
# Export to CSV
filesweep scan /path/to/directory --format csv
# Export to XML with custom output path
filesweep scan /path/to/directory --format xml --output my_files.xml
Cleaning files by pattern
# Remove all temporary files
filesweep clean /path/to/directory "*.tmp"
# Remove all log files
filesweep clean /path/to/directory "*.log"
Python API
from filesweep.scanner import FileScanner
from filesweep.cleaner import FileCleaner
# Scan files and export data
scanner = FileScanner("/path/to/directory")
scanner.export_to_json("file_data.json") # or export_to_csv, export_to_xml
# Clean files matching a pattern
cleaner = FileCleaner("/path/to/directory")
deleted_files = cleaner.clean_files("*.tmp")
print(f"Cleaned {len(deleted_files)} files")
Documentation
For more detailed documentation, see the docs directory.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Author
- Rakshith Kalmadi - GitHub
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file filesweep-0.1.1.tar.gz.
File metadata
- Download URL: filesweep-0.1.1.tar.gz
- Upload date:
- Size: 7.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
989619647b7c26a2b72decf379dfd773217f724fb7fe9963c45ce05999509d2f
|
|
| MD5 |
58992b0c8c886afa187b9cc35b98f59b
|
|
| BLAKE2b-256 |
83bde4ae5514b026a931585ee2511fbe45c6b1d338cb60507c2a1ea71fba571c
|
File details
Details for the file filesweep-0.1.1-py3-none-any.whl.
File metadata
- Download URL: filesweep-0.1.1-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
465e285693899f685b63c987a6ba6913393bb3f4c4f356ea20506e36f08ef75c
|
|
| MD5 |
6f4ff5ec99a398b155d2658f85e198b9
|
|
| BLAKE2b-256 |
9141e00bb894023b7e7b9caf6035796ebb86315eb678ba662c8a9c97d99aabb9
|