Can someone help me create a preset to remove a string before the filename. For example the file name is "Wu Tang Collection- Killer Elephants" I would like it to be renamed to "Killer Elephants". Sometimes the prefix varies by the hyphen location Wu Tang Collection-, Wu Tang Collection -, Wu Tang Collection -.
Thanks
Preset Help
Re: Preset Help
ez
or
or
btw: use this
viewtopic.php?t=2072
Code: Select all
{
fn.replaceAll(/Wu Tang Collection\s?-\s?/)
}
Code: Select all
{
fn.replaceAll(/\w.+Collection\s?-\s?/)
}
Code: Select all
{
fn.after(/Collection\s?-/)
}
viewtopic.php?t=2072
Last edited by kim on 04 Nov 2018, 02:56, edited 1 time in total.
-
- Posts: 6
- Joined: 24 Oct 2018, 21:43
Re: Preset Help
Thanks for your help Kim. But neither of the code snippets work. Im using the platform version. Here is a paste from hitting F7
Wu Tang Collection - Evidence.mkv null
Wu Tang Collection - From Bangkok With Orders To Kill.mkv null
Wu Tang Collection - Infernal ST - ENGLISH Subtitled.mkv null
Wu Tang Collection - Invincible Buddhism Kung Fu -ENGLISH Subtitled.mkv null
Wu Tang Collection - Kung Fu Kids - Dick Wei - ENGLISH Subtitled.mkv null
Wu Tang Collection - Lackey and the Lady Tiger.mkv null
Wu Tang Collection - MAD DRAGON (English Subtitles).mkv null
Wu Tang Collection - Out Of Danger - ENGLISH Subtitled.mkv null
Wu Tang Collection - Panna Rittikrai in Black Killer.mkv null
Wu Tang Collection - Evidence.mkv null
Wu Tang Collection - From Bangkok With Orders To Kill.mkv null
Wu Tang Collection - Infernal ST - ENGLISH Subtitled.mkv null
Wu Tang Collection - Invincible Buddhism Kung Fu -ENGLISH Subtitled.mkv null
Wu Tang Collection - Kung Fu Kids - Dick Wei - ENGLISH Subtitled.mkv null
Wu Tang Collection - Lackey and the Lady Tiger.mkv null
Wu Tang Collection - MAD DRAGON (English Subtitles).mkv null
Wu Tang Collection - Out Of Danger - ENGLISH Subtitled.mkv null
Wu Tang Collection - Panna Rittikrai in Black Killer.mkv null
Re: Preset Help
Are you sure, you are using:
try it out hereBatch Rename any type of file
Post by rednoah » 13 Oct 2014, 21:47
As a hidden bonus feature, FileBot supports quick and efficient generic batch renaming, and you can rewrite the filenames with awesome Groovy expressions just like in Episode / Movie mode.
1. Drop files into Original Files
2. Click on the empty New Names component
3. Now that New Names has focus hit F2
4. New Names will instantly filled with File objects (or Episode / Movie objects if xattr metadata has previously been stored)
5. Double Click any item in New Names to apply a new Format Expression
Create Presets for repetitive tasks.
Hit F2 after selecting an item to edit the name.
https://regexr.com/42f3v
-
- Posts: 6
- Joined: 24 Oct 2018, 21:43
Re: Preset Help
Thanks it worked. I wasn't completing the steps on the batch rename. Now I know how it works. Where can i go learn more about scripting for this tool?
Re: Preset Help
More info on FileBot Format Expressions:
https://www.filebot.net/naming.html
Format Expressions are based on Groovy, which in turn allows you to leverage the entire Java API, hence Java / Groovy basics (especially the APIs) will be extremely helpful. FileBot just adds a little bit (in terms of convenience methods) on top of that.
Note that there's also command-line shell scripts, as well as FileBot Groovy scripts, and not to be confused with format expressions.
https://www.filebot.net/naming.html

