Top level directory relative to file

Support for macOS users
Post Reply
JBW
Posts: 10
Joined: 20 Aug 2017, 19:46

Top level directory relative to file

Post by JBW »

Hi,

I've searched the forum and couldn't come up with a solution so hoping someone can help, apologies if I have missed something obvious.

Using Filebot GUI on macOS format expression looks like this

Code: Select all

Plex/{plex} [{vf}{bitdepth>=10 ? '.10bit' : null}{".$source"}{".$vc"}{".$af"}{"-$group"}]
I am currently renaming files on several different hard drives and I want the output directory to be the root of whatever drive the file was on followed by the expression above regardless of how many folders deep the source file is e.g. Volumes/HD01/Plex/etc....

I have to change the Volume if I move to another hard drive, is there any way to make this always relative to the top level of the drive.

Thanks
User avatar
rednoah
The Source
Posts: 22986
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Top level directory relative to file

Post by rednoah »

1.
If you use a relative destination format such as {plex} then it should already be relative to whatever media structure root makes sense for your files. How is the current behavior different from the behavior you want?


2.
So you basically want to keep the first two folders of the original path to generate an absolute destination path?

e.g.

Code: Select all

{f[0..2]}/Plex/{plex}
:idea: Please read the FAQ and How to Request Help.
JBW
Posts: 10
Joined: 20 Aug 2017, 19:46

Re: Top level directory relative to file

Post by JBW »

Thank You rednoah

2. That's exactly what I needed.

1. the problem I had here was the media files were not all at the root level, some were 4 or 5 folders down and so the Plex folder was not always being created at the top level.

Excellent program, thanks for your help.
Post Reply