[bash] List your TV Shows or Movies

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
User avatar
rednoah
The Source
Posts: 24105
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

[bash] List your TV Shows or Movies

Post by rednoah »

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:

Shell: Select all

filebot -mediainfo -r /path/to/files --filter episode --format "{n}" | Sort-Object -Unique

e.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
-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


:idea: Add > /path/to/list.txt to the command above to redirect the output into a text file.

:idea: Replace --filter episode with --filter movie to query for movies only and list movie names.
:idea: Please read the FAQ and How to Request Help.
Post Reply