Sort of a finger exercise in Python - several tools for listing files filtered by name/type in a folder and writing information to stdout
, a CSV file or to a Sqlite database.
- pfl - Simple file listing with just path and filename
- pfli - File listing with additional file information on size and creation / last write dates
- pflh - as before, plus SHA256 hash
- pflj - File listing with fixed search pattern '*.jpg', JPG width and height are written
- pfl3 - File listing with fixed search pattern '*.mp3', MP3 tag information is given
- pfl4 - File listing with fixed search pattern '*.mp4', MP4 tag information is given
pfl [-h] [-r] [-x EXCLUDE] [-o | -u] [-n | -d DOTS] [pattern] [scandir] [outfile]
- pattern - only files matching this pattern will be listed
- scandir - directory to scan for files (default=current folder)
- outfile - CSV or database file to write results to (default=stdout)
- -h, --help - show help message and exit
- -r, --recurse - recurse sub-folders
- -x EXCLUDE, --exclude EXCLUDE - exclude files and/or folders matching this regular expression
- -l, --limit - limit the scanned file size for hash value calculation to 100MB (pflh only)
optional arguments apply when writing to CSV or database file (ignored otherwise)
- -o, --overwrite - overwrite the outfile if existent
- -u, --update - update SQLite database or append to the CSV outfile if existent
- -n, --nodots - do not display dots for matches
- -d DOTS, --dots DOTS - logarithmic number of matching files to display one dot for (i.e. 0=every file, 1=each 10 files, 2=each 100 files...)
For using the tools which log media file (jpg/mp3/mp4) properties, you will have to install one or more additional Python libraries:
- TinyTag: used for pfl3 and pfl4
pip install tinytag
- Pillow: used for pflj
pip install Pillow