Page 1 of 1

Need help with periods being left in the renamed files

Posted: 23 Mar 2014, 20:01
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.

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

Posted: 24 Mar 2014, 05:03
by rednoah

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

Posted: 24 Mar 2014, 22:31
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.

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

Posted: 25 Mar 2014, 05:38
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