[bash] List your TV Shows or Movies
Posted: 30 Jul 2025, 13:39
You can use the filebot -mediainfo command to quickly query your file system for all your TV Shows or Movies using xattr metadata and export them into a text file.
e.g. query TV Shows via PowerShell on Windows:
e.g. query TV Shows via bash on macOS or Linux:
-r /path/to/files ... your TV Shows folder
--filter episode ... ignore files that are not episode files
--format "{n}" ... print the series name for each episode
| sort -u ... pipe the output to the sort command to generate a list of unique alphabetically sorted series names
Add > /path/to/list.txt to the command above to redirect the output into a text file.
Replace --filter episode with --filter movie to query for movies only and list movie names.
e.g. query TV Shows via PowerShell on Windows:
Shell: Select all
filebot -mediainfo -r /path/to/files --filter episode --format "{n}" | Sort-Object -Uniquee.g. query TV Shows via bash on macOS or Linux:
Shell: Select all
filebot -mediainfo -r /path/to/files --filter episode --format "{n}" | sort -u--filter episode ... ignore files that are not episode files
--format "{n}" ... print the series name for each episode
| sort -u ... pipe the output to the sort command to generate a list of unique alphabetically sorted series names