CLI tool to list files and export to Excel
Project description
📂 filexl
A simple Python CLI tool to list all files in a given directory and export them to an Excel file. Supports filtering by file extension, optional path naming, and detection of duplicate file names.
🚀 Features
- 🔍 Recursively lists all files in a directory (including hidden files)
- 📝 Outputs to Excel with columns:
- File Name
- Extension
- Full Path
- Path Name (optional)
- 🔁 Appends to existing Excel files
- 🎯 Filter by file extension (
--ext) - 🔎 Export only duplicate file names with
--only-duplicates - 🔠 Optional case-insensitive extension filtering
- ✅ Simple CLI interface with
--helpsupport
🧰 Installation
pip install filexl
⚙️ Options
| Option | Description |
|---|---|
--extensions |
Filter files by specific extensions (e.g., .jpg .png) |
--case-sensitive |
Match extensions case-sensitively |
--only-duplicates |
Save only files with duplicate file names |
--extract-duplicates-from |
Create a new Excel file containing only duplicates from an existing Excel file |
--out |
Output Excel file name for extracted duplicates |
--help |
Show help message and usage instructions |
📦 Usage
Basic usage
filexl --path D:\data
With optional path name and Excel file name
filexl --path D:\data --name "MyData" --filename myfiles.xlsx
Filter by extensions (space or comma-separated)
filexl --path D:\images --ext .jpg .png --ignore-case
Export only duplicate file names
# With default output name (duplicates.xlsx)
filexl --path D:\data --only-duplicates
# Or with a custom output file
filexl --path D:\data --only-duplicates mydups.xlsx
Extract Duplicates from an Existing Excel
filexl --extract-duplicates-from myfiles.xlsx --out only_duplicates.xlsx
This command reads myfiles.xlsx, finds duplicate file names, and writes them to only_duplicates.xlsx.
🧪 Example Output
| File Name | Extension | Path | Path Name |
|---|---|---|---|
| report | D:\docs\2023\report.pdf | Documents | |
| report | D:\docs\2022\report.pdf | Documents | |
| image | jpg | D:\media\photos\image.jpg | Media |
| notes | txt | D:\projects\docs\notes.txt | Projects |
🧱 Development
To build a standalone executable:
pip install pyinstaller
pyinstaller --onefile filexl/cli.py
📜 License
MIT License. Use it freely in your own projects!
👨💻 Author
Developed by Kiarash Gharahgozloo GitHub: @kiarash-gh
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 filexl-1.0.2.tar.gz.
File metadata
- Download URL: filexl-1.0.2.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3aa1cad049a14d8bc739873623d17458b9cd7d3a8f23163deea4c11da088ba0e
|
|
| MD5 |
783ec992f74fa1fdbaf5ca15c786107f
|
|
| BLAKE2b-256 |
b7d2d7481cbfd709af3801bcd0c6cd85d7c073f5cd1322a830c43ff9d1646df0
|
File details
Details for the file filexl-1.0.2-py3-none-any.whl.
File metadata
- Download URL: filexl-1.0.2-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b1bed9bb71f6bdb2604626238fa8a910c88e3feee29ec948b6be2664628146eb
|
|
| MD5 |
ca13c71902b2a22503b29d6d7a92bfc6
|
|
| BLAKE2b-256 |
6474c5543220ab51888eb987b581a7548ce89fe49d45e48ce4fc466bca0e80d8
|