Retaining folder names for Genres

All about user-defined episode / movie / file name format expressions
Post Reply
g3rman
Donor
Posts: 18
Joined: 24 Oct 2013, 16:14

Retaining folder names for Genres

Post by g3rman »

Greetings experts :)

My TV shows arrive in the following format:

C:\TV\Drama\Show Name.s01e01.xyz\Show Name.s01e01.xyz.avi
C:\TV\Drama\Show Name.s01e02.xyz\Show Name.s01e02.xyz.avi

C:\TV\Comedy\Show Name.s01e01.xyz\Show Name.s01e01.xyz.avi
C:\TV\Comedy\Show Name.s01e02.xyz\Show Name.s01e02.xyz.avi

The first folder after TV is a genre label, the next folder is the name of the show and episode, which in turn contains the video file.
Finding shows works like a champ. However I'm having a hard time figuring out how to retain the "genre" label, e.g. Drama or Comedy.
Ideally I'd like the above to be sorted as:

C:\TV\Drama\Show Name\Show Name - S01E01.avi
C:\TV\Drama\Show Name\Show Name - S01E02.avi

etc


Any help would be much appreciated!!
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Retaining folder names for Genres

Post by rednoah »

Option 1: Grab name of the folder 2 steps up:

Code: Select all

{file.parentFile.parentFile.name}
Option 2: Grab tokens from the path:

Code: Select all

{folder.path.match(/Drama|Comedy/)}
:idea: Please read the FAQ and How to Request Help.
g3rman
Donor
Posts: 18
Joined: 24 Oct 2013, 16:14

Re: Retaining folder names for Genres

Post by g3rman »

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Incoming donation!! :)
Post Reply