--file-filter syntax?

Any questions? Need some help?
Post Reply
unpressurized
Posts: 4
Joined: 08 Mar 2019, 12:33

--file-filter syntax?

Post by unpressurized »

I want to give FileBot a directory and have it move video files, but exclude other junk like .nfo or .png files.

I've been doing this with "find", but it seems like "--file-filter" could do the same thing. However I can't find a reference for the syntax. I've seen https://www.filebot.net/naming.html but then I've also seen references to things like "f.archive" and --file-filter "f =~ /3D/ || h > 650". But these variables aren't listed anywhere I can find.

Is there a reference page I'm missing? How can I discover things like "f.archive"?
User avatar
rednoah
The Source
Posts: 22976
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: --file-filter syntax?

Post by rednoah »

find is not a bad solution, since it's extremely fast. The filter option is more powerful and works on Windows. The advantage is that you can use your FileBot format skills, i.e. all documentation that applies to custom formats also applied to filter expressions of various kinds.

File.isVideo() is a FileBot / Groovy extension, so you can use f.video as your filter. You can also use your general Groovy skills to write a filter like this f.name =~ /[.](avi|mkv|mp4)$/.
:idea: Please read the FAQ and How to Request Help.
Post Reply