Outdated documentation on Plex Media Scanner CLI: can't scan a single file

Server Version#: Version 1.20.1.3252

Hello everyone,
I noticed that the documentation about the CLI usage of Plex Media Scanner is outdated.
Going to https://support.plex.tv/articles/201242707-plex-media-scanner-via-command-line/ it gives us the documentation referring to the old scanner.
I noticed that something big changed, in particular on the new scanner this is the output of --help:

Items to which actions apply:

-c, --section A library section ID.
-o, --item An item ID.
-d, --directory A directory path.
–activity An activity UUID.

While on the documentation on Plex website it says so:

Items to which actions apply:

-c, --section A library section ID.
-o, --item An item ID.
-d, --directory A directory path.
-f, --file A file.

The result is that I can’t use the --file flag anymore as it does not scan a single file.

Here’s my command:

“Plex Media Scanner.exe” -v -p -s -r -c 1 -f “path-to-file”

and here is the output:
Error: Cannot select file and something else.

Is there any chance to scan a single file with the CLI with the new scanner?

Thanks

You can, but now you must leave out the section id (-c):
“Plex Media Scanner.exe” -v -p -s -r -f “path-to-file”

The scanner knows the section to which the file belongs since the path should be unique for a particular library (no two or more libraries should share the same base path).

Mmh, nope: if I write:
“Plex Media Scanner.exe” -v -p -s -r -f “path-to-file”
it just kicks off a complete scan of the paths of my movie library.

Anyway, the documentation is still outdated.

I am having the same issue. Did you every find a way to scan a single file?

You cannot scan single files. It will always be a folder that is scanned.

Putting all movie files together in a flat folder is a bad idea anyway. You will inevitably get performance issues that way, once the number of files exceeds a few dozens.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.