[Solved]Using Linux cmdline, how to create output directories

Any questions? Need some help?
Post Reply
craigjl77
Posts: 4
Joined: 05 Jan 2024, 23:54

[Solved]Using Linux cmdline, how to create output directories

Post by craigjl77 »

Hi,
I need a cmdline example of how to create output directories of the format
/videos/<tvseriesname>/<seasonnumber>/episodename_Snn:Enn


Please don't suggest I use a precanned format ie emby or plex as it's not my use case atm


Tried this on the cmdline

Code: Select all

f--output $HOME/Videos/\{n\}/\{'S'\+s.pad\(2\)\}
and this using an @/inputfile.txt

Code: Select all

--format
{n.replace(' ':'')}_{y}_{s00e00}_{t.replace('&':'And').replace(' ':'_')}
-r
--db
TheMovieDB::TV
/home/craigl/Vsource
-rename
-non-strict
-no-xattr
--output
/home/craigl/Videos/{n}/{'S'+s.pad(2)}
--action
duplicate
but learned from the forums that binds do not work on -output

Hoping you can help :-)
Last edited by craigjl77 on 07 Jan 2024, 07:34, edited 1 time in total.
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Using Linux cmdline, how to create output directories

Post by rednoah »

--output must be a real folder path and cannot contain variables. --format is a template.

e.g.

Shell: Select all

--output
/home/craigl/Videos
--format
{n}/{'S'+s.pad(2)}/{n.replace(' ':'')}_{y}_{s00e00}_{t.replace('&':'And').replace(' ':'_')}



TIP:

You can have files at multiple file paths. If you want "bad file paths for convenience" then I recommend a primary structure with {plex.id} or {jellyfin.id} and then mirror that structure to a disposable bad structure on demand when needed via --db xattr mode with --action hardlink. See Re-process previously organized files using local xattr metadata for details and examples.
:idea: Please read the FAQ and How to Request Help.
craigjl77
Posts: 4
Joined: 05 Jan 2024, 23:54

Re: Using Linux cmdline, how to create output directories

Post by craigjl77 »

Thanks @rednoah ur Legend :-)
Post Reply