Help with a File Format Template

Support for Windows users
Post Reply
redangellion
Posts: 5
Joined: 23 Dec 2019, 20:04

Help with a File Format Template

Post by redangellion »

Hi. I'm somewhat new to FileBot and know basically nothing about coding languages. Up to this point I have managed to muddle through some basic automation of file renaming using the F2 menu in FileBot, mostly by googling. However, I'm currently trying to do something that has me stumped.

I'm trying to rename some episodes of a tv show, and the episodes actually contain 2 episodes per file. I'm trying to rename them in an appropriate manner so that FileBot will have the best possible accuracy during a search. Here's an example of what I'm trying to do:

I have a set of files named:

"s01e01.m4v"
"s01e02.m4v"

and so on.

I want to rename these files to:

"s01e01 & s01e02.m4v"
"s01e03 & s01e04.m4v"

and son.

The following line in F2->Edit Format:

s01e{+i} & s01e{1+i}

...gets me close.

It correctly renames the first file. However, the next file not so much. It ends up looking like this:

"s01e01 & s01e02.m4v"
"s01e02 & s01e03.m4v"

And so on.

What am I doing wrong, here? As I said, I've just been muddling through up to this point, living off of snippets I've found in google searches and trying to make them work. If anyone can educate me here, I'd appreciate it.

P.S. If anyone has any suggestions or links for learning this stuff on my own, I'm totally open to it. I've done some googling on that, as well, but quickly become overwhelmed!
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Help with a File Format Template

Post by rednoah »

1.
Please provide context and a use case (ideally with screenshots) so that we can see the big picture:
viewtopic.php?t=1868


:arrow: Your use case seems similar to this one, i.e. rename multi-episode cartoons that are misnumbered or not numbered:
viewtopic.php?t=13178


:!: You can't fix the file name in your custom format if the match is already wrong. If it's a multi-episode, then it won't work if FileBot doesn't detect it as such. In this case, you'd use Edit Match to fix the match first, so that the formatter can then give you the correct file names for the match at hand. Please read FAQ #2 for details.

Image

Image



2.
If you are using Plain File Mode (i.e. your use case is unrelated to renaming episode files in Episode Mode) then you can generate the list of file names you want like so:

Code: Select all

s01e{(2*i-1).pad 2} & s01e{(2*i).pad 2}
Image
:idea: Please read the FAQ and How to Request Help.
Post Reply