Top level directory relative to file

Support for Mac OS X users and the Mac App Store package
Post Reply
JBW
Posts: 2
Joined: 20 Aug 2017, 19:46

Top level directory relative to file

Post by JBW » 21 Aug 2017, 00:54

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: 12455
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Top level directory relative to file

Post by rednoah » 21 Aug 2017, 01:39

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}
My (very excellent) support depends on Windows Store and Mac App Store sales and PayPal donations. Paying users, donors and everyone who contributes to FileBot in one way or another will get the very best support.

Image

Please read the FAQ and How to Request Help. Donate if you'd like some extra developer love. :ugeek:

JBW
Posts: 2
Joined: 20 Aug 2017, 19:46

Re: Top level directory relative to file

Post by JBW » 21 Aug 2017, 17:47

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

Who is online

Users browsing this forum: No registered users and 1 guest