File Lister
This script scans a directory for files, optionally excluding specific directories and file extensions, and saves the list to a text file.
Features
Scan directories recursively
Exclude specific directories and file extensions
Save results to a text file
Verbose mode to include file sizes
Option to sort files by size
Usage
Arguments
directory
: Directory to scan for files-o OUTPUT, --output OUTPUT
: Output file name (default: files_to_add.txt)--exclude-dirs [EXCLUDE_DIRS ...]
: Directories to exclude--exclude-extensions [EXCLUDE_EXTENSIONS ...]
: File extensions to exclude-v, --verbose
: Enable verbose output (includes file sizes)-s, --sort-by-size
: Sort files by size (largest first)
Examples
Basic usage:
Exclude specific directories and file extensions:
Use verbose mode and sort by size:
Specify custom output file:
Requirements
Python 3.6+
License
This project is open source and available under the MIT License.
Last updated