Page 1 of 1

Feature Request, Filename Pre-Processing

Posted: 26 Dec 2022, 19:46
by arrmo
Hi,

Another minor one, but before trying to match, it would be handy to be able to "clean" (pre-process) the file name. Some of my auto-downloaded files show up as (generic) "12345678_Show_Name.mp4". The match would be much better (more successful) if "12345678_" were removed first.

Thanks!

Re: Feature Request, Filename Pre-Processing

Posted: 27 Dec 2022, 03:44
by rednoah
:arrow: Please post file paths as text so that we can see what you are seeing. Please post the actual file path verbatim (and console output if you're using the CLI) so that we can have a look ourselves.


Please read How to Request Help for details:
rednoah wrote: 31 Jul 2014, 16:40
  • Include file paths as text when reporting mismatches (press F7 to copy debug information)



:arrow: You can use Plain File Mode to process generic files, or pre-process files to strip misleading patterns.

Re: Feature Request, Filename Pre-Processing

Posted: 28 Dec 2022, 13:35
by arrmo
Thanks! I did try to find how to post the filename, even tried a few options ... LOL. But I missed the desired format, sorry.

No ability to pre-process in filebot itself, strip the leading number?

Thanks again.

Re: Feature Request, Filename Pre-Processing

Posted: 28 Dec 2022, 15:04
by rednoah
arrmo wrote: 28 Dec 2022, 13:35 Thanks! I did try to find how to post the filename, even tried a few options ... LOL. But I missed the desired format, sorry.
:?: What exactly have you tried? Where exactly did you get stuck? Maybe your keyboard doesn't have an F7 key? :lol:
rednoah wrote: 27 Dec 2022, 03:44 :arrow: Please post file paths as text so that we can see what you are seeing.
If you click on the file paths as text link then you will find step by step instructions:
  1. Press F7 (in FileBot)
  2. Press CTRL+V (in the text editor when making a new post)


arrmo wrote: 28 Dec 2022, 13:35 No ability to pre-process in filebot itself, strip the leading number?
:?: Which part of my response indicates to you "no ability" because I'm trying to convey "yes, sure, no problem, here's how you do it" to the best of my writing ability... :lol:
rednoah wrote: 27 Dec 2022, 03:44 :arrow: You can use Plain File Mode to process generic files, or pre-process files to strip misleading patterns.
e.g. use Plain File Mode to strip leading numbers from file names:

Code: Select all

$ filebot -rename *.mp4 --db file --format "{ fn.after(/^\d+_/) }" --action TEST --log INFO
[TEST] from [12345678_Alias.1x01.mp4] to [Alias.1x01.mp4]

Re: Feature Request, Filename Pre-Processing

Posted: 28 Dec 2022, 19:29
by arrmo
OK, I get your point now :lol:. Sorry, I was thinking in the GUI, not command line. What you say for the command line is clear, but no similar functionality / approach for the GUI? Or are you saying to use a similar syntax for the GUI renaming?

Thanks!

Re: Feature Request, Filename Pre-Processing

Posted: 29 Dec 2022, 03:47
by rednoah
Plain File Mode explains how Plain File Mode works in the GUI with multiple examples and screenshots:
rednoah wrote: 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 press F2 (for Plain File Mode) or F3 (for Local Xattr Mode)
4. New Names will instantly filled with File objects (in Plain File Mode) or Movie / Episode objects (in Local Xattr Mode)
5. Double Click any item in New Names to apply a new Format Expression


:idea: Create Presets for repetitive tasks.

:idea: Hit F2 after selecting an item to edit the name.

:idea: Hit F3 after selecting an item to select a different metadata object.

:idea: --db file and --db xattr can be used for Plain File Mode and Local Xattr Mode on the command-line.
:?: Did you read the instructions? If I give you a link to the answer to your question, then you'll want to click on that link and read. Because presumably you'll want to know the answer to the question you have asked, no? :lol: :lol: :lol:

:?: Are the instructions not clear? What exactly is not clear?




:arrow: You can copy and paste the Plain File Format for "strip leading numbers" from the example above:

Code: Select all

{ fn.after(/^\d+_/) }
Image

Re: Feature Request, Filename Pre-Processing

Posted: 29 Dec 2022, 23:56
by arrmo
OK, that makes sense - thanks! So use File Format to "clean up" the name, then from there process the files (i.e. Episode, Movie, etc.). Correct?

I admit, searching for a list of the keyboard shortcuts ... F7, F2 ... LOL. I'll find it though.

Thanks again.

Re: Feature Request, Filename Pre-Processing

Posted: 29 Dec 2022, 23:58
by arrmo
Yep, and found it (keyboard shortcuts) :). Let me give the steps above a try.

Thanks!

Re: Feature Request, Filename Pre-Processing

Posted: 30 Dec 2022, 03:47
by rednoah
You'll want to create a Presets for repetitive tasks. The keyboard shortcuts are optional.
rednoah wrote: 13 Oct 2014, 21:47 :idea: Create Presets for repetitive tasks.

Image


Image

Re: Feature Request, Filename Pre-Processing

Posted: 19 Mar 2023, 18:16
by arrmo
To close the loop - got it all working here. Some of above was me misunderstanding of course. Thanks!!