Need help with periods being left in the renamed files

Any questions? Need some help?
Post Reply
Orochi
Posts: 3
Joined: 23 Mar 2014, 15:39

Need help with periods being left in the renamed files

Post by Orochi »

Hello,

First of all, I want to say thank you for a great program.

I just started using the program and having a little difficulty with periods being left in the renamed files.

My current template is as follows:

Avatar.(2009).720p.BRrip.x264.YIFY.mp4
{n.upperInitial().space('.')}.({y}).{vf}.{source}.{vc}.{group}

However, if one of the parameters is not identified during mediainfo scan or from source, it will be missing from the renamed file. The problem for me lies in the extra period being left.

For example: if the group of the file is not found then a following file will be produced.
Avatar.(2009).720p.BRrip.x264..mp4 Notice the extra period before the extension.

Is there a way to remedy this situation?

Thanks.
Orochi
Posts: 3
Joined: 23 Mar 2014, 15:39

Re: Need help with periods being left in the renamed files

Post by Orochi »

Thank you so much rednoah.
This was a great help.

Now my code looks like that:

Avatar.(2009).720p.BRrip.x264.YIFY.mp4

Code: Select all

{n.upperInitial().space('.')}.({y}).{vf}{'.'+source}.{vc}{'.'+group}
However, what about movies which are split into CD1 and CD2.
If I add {CD$pi} parameter, it will in turn cause all renamed movies to have CD1.
Is it possible to add {CD$pi} in such a way, that if a movie already contains CD1 or CD2 etc., filebot will rename the file and move the CD1 or CD2 etc.. portion of the file name to the end of the file name?

Thank you.
User avatar
rednoah
The Source
Posts: 23926
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Need help with periods being left in the renamed files

Post by rednoah »

This is all the same thing:

Code: Select all

{'.'+group}

Code: Select all

{".$group"}

Code: Select all

{".${group}"}
Different way of writing the code, but as long as the string literal and the variables are in the same {...} they will succeed or fail together.

@see http://groovy.codehaus.org/Strings+and+GString


And the CD1 thing doesn't work the way you think, please read this:
http://www.filebot.net/forums/viewtopic.php?f=5&t=806
:idea: Please read the FAQ and How to Request Help.
Post Reply