Move to X folder if dir tree contains "BDMV" or ISO?

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
machine123
Posts: 3
Joined: 03 Oct 2017, 04:18

Move to X folder if dir tree contains "BDMV" or ISO?

Post by machine123 »

Hi,

Sorry if this is a stupid question, is it possible for filebot to move a directory to a specific folder if any of the sub-directories contain "BDMV" or one of the files is an *.ISO

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

Re: Move to X folder if dir tree contains "BDMV" or ISO?

Post by rednoah »

Yes, the format engine is quite capable of that. You'll need to express your custom logic with Groovy code though.
:idea: Please read the FAQ and How to Request Help.
howdymilsap
Posts: 35
Joined: 14 Jul 2018, 17:22

Re: Move to X folder if dir tree contains "BDMV" or ISO?

Post by howdymilsap »

@rednoah,

I also have this same need. Are there any examples of a solution to help get us started? Thanks!

For additional clarification on what I am trying to do: I have a current filebot config that automatically organizes movies using the {plex} naming convention. I amended the out of the box solution with a modification that uses filebot to determine if the movie is 4K or not. If it is 4K/UHD I move them into a separate 4K folder structure. Anything HD or SD is moved into a standard movies folder structure. This is pretty straightforward and there were many solutions/suggestions in these forums that helped me get this working perfectly. I then point my plex setup to these different 'collections' and it works great.

What I am noticing now is the occasional BDMV or ISO is getting put into this folder structure and plex doesn't handle it well. I'd like to have filebot determine if I am dealing with an ISO or BDMV folder structure and direct the output to a new top level folder (blu-ray for example). I am hoping I can implement this in a similar way that I did with the UHD/HD/SD determination detailed above. Any examples along these lines would be welcomed.
User avatar
rednoah
The Source
Posts: 22984
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Move to X folder if dir tree contains "BDMV" or ISO?

Post by rednoah »

Here's an example:

Code: Select all

{f =~ /BDMV|ISO/ ? 'BluRay Disk' : 'Normal File'}
f =~ /BDMV|ISO/ this snippet is doing a regex-find on the file path
:idea: Please read the FAQ and How to Request Help.
Post Reply