Page 1 of 1

Top level directory relative to file

Posted: 21 Aug 2017, 00:54
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

Re: Top level directory relative to file

Posted: 21 Aug 2017, 01:39
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}

Re: Top level directory relative to file

Posted: 21 Aug 2017, 17:47
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.