Page 1 of 1
Create Subfolder in Current Folder Issue
Posted: 01 Sep 2024, 13:50
by trigmoth5
I am looking for a way to take a tv episode to create the folder based off the title ie. Chucky/ and put it in the current folder, but what i am finding is this { f[0] }/{ ~plex } creates the folder on the D: drive and not in the current folder of D:/TV Shows.
Example location D:\TV\chucky s02e02.mkv
and i want filebot to create a folder called chucky (in the current TV folder) like this:
D:\TV Shows\Chucky\Season 02\Chucky - S02E02 - The Sinners Are Much More Fun.mkv
Now the tricky thing is i thought the code above worked for 5 shows and kept them in the current folder (TV Shows) and then today it didnt it put them in the D: Folder.
Now i have other folders il go into for filebot so like housemates tv shows etc, so its not always in TV Shows folder.
Any ideas?
Re: Create Subfolder in Current Folder Issue
Posted: 01 Sep 2024, 18:21
by rednoah
will always generate
Code: Select all
D:\Chucky\Season 02\Chucky - S02E02 - The Sinners Are Much More Fun
because
{ f[0] } (the first path component; i.e. the drive letter) is
D: and
{ ~plex } (i.e. {plex} path but without TV Shows category folder level) is
Chucky\Season 02\Chucky - S02E02 - The Sinners Are Much More Fun.
will generate file paths such as this:
Code: Select all
D:\TV Shows\Chucky\Season 02\Chucky - S02E02 - The Sinners Are Much More Fun.mkv

If you need to use more variables, then
{drive} or
{f[0]} will give you the drive letter for the file at hand.
{folder} or
{f.dir} will give you the parent folder of the file at hand.
f[0..1] will give you the first 2 folder levels
(the first is the drive letter) if you need to copy the
D:/TV bit from the file at hand, rather than using
TV Shows which
{plex} will give you:
...

Fewer variables make code easier to understand though, so I'd go with simplicity if complexity is unnecessary for your use case:

If you're organizing files for Plex, then make sure to use
{plex.id} to add
{tmdb-id} markers to all file paths. See
How do I organize files for Plex? for details.
Re: Create Subfolder in Current Folder Issue
Posted: 02 Sep 2024, 01:03
by trigmoth5
thank you for explaining rednoah,
** UPDATE rednoah i think i solved it, but want your thoughts on below **
{ folder }/{ ~plex.year.id }
creates this:
D:\Chucky (2021) {tmdb-90462}\Season 02\Chucky (2021) - S02E02 - The Sinners Are Much More Fun.mkv
Original question i asked was Is there a way to combine {plex.year} with {plex.id} ? ? I like the plex.id to help plex locate it instantly but i also like the year mentioned.
And to create in the current folder the code is { folder }/
And if i want it to create TV Shows i just remove ~ from { ~plex.year.id }
Thanks
Re: Create Subfolder in Current Folder Issue
Posted: 02 Sep 2024, 03:56
by rednoah

The
Bindings button will help you find the building blocks you need for your custom format.
