INTERACT FORUM

More => Old Versions => Media Center 17 => Topic started by: cron0sRXR8 on April 19, 2013, 04:00:01 pm

Title: Problem with counter() for rename files. Possible bug?
Post by: cron0sRXR8 on April 19, 2013, 04:00:01 pm
Hi, when I try rename files with counter() function the program don't start in 1.

I try this for rename files:

"video.mp4 - Counter()"

when I do it this, in the preview name appear numbers not correct. Not appear 1, 2, 3... Appear 46546, 54654, 77898... when you move the mouse the numbers are change.

How to solve this??

thank you!
Title: Re: Problem with counter() for rename files. Possible bug?
Post by: marko on April 20, 2013, 02:27:48 am
If you are using the "rename, move and copy files" tool, use CustomData(#) instead.

"video.mp4 - customdata(#)"

This will number them sequentially from 1 to whatever. If you want the single digits to padded, 01 as opposed to 1, wrap it up in padnumber()...
"video.mp4 - padnumber(customdata(#),2)

If you are not using the rename, move and copy files tool, read up on the linked info regarding how "counter()" works, and let us know if that helps. If you have more questions, that's fine too, just ask away.
Read this section of the expressions page (http://wiki.jriver.com/index.php/Media_Center_expression_language#Counter.28....29:_Counts_upwards_in_specified_increments) on the wiki, as well as the "customdata()" section that follows it. There two links in there for more info, right click and open in new tab if you wish to keep the wiki page open.

-marko
Title: Re: Problem with counter() for rename files. Possible bug?
Post by: cron0sRXR8 on April 20, 2013, 11:04:09 am
This will number them sequentially from 1 to whatever. If you want the single digits to padded, 01 as opposed to 1, wrap it up in padnumber()...
"video.mp4 - padnumber(customdata(#),2)


works very fine!

very thanks!!!
Title: Re: Problem with counter() for rename files. Possible bug?
Post by: cron0sRXR8 on April 21, 2013, 01:08:35 pm
Hi another time!

If I want start in 600, what is the expression?? it's 600, 601, 602...
I need an expression that work from a any number. Not only starting at number one

"video.mp4 - customdata(#)"

video.mp4 - 1
video.mp4 - 2
video.mp4 - 3
video.mp4 - 4
...

I need a expression for raname doing this:

Start in 645.

video.mp4 - 645
video.mp4 - 646
video.mp4 - 647
video.mp4 - 648
...

What is the code??

many thank you!!


Title: Re: Problem with counter() for rename files. Possible bug?
Post by: cron0sRXR8 on April 22, 2013, 04:34:49 am
solved:
video name Math(0 + customdata(#))

Title: Re: Problem with counter() for rename files. Possible bug?
Post by: MrC on April 22, 2013, 11:42:33 am
FYI: Counter() continues to count so long as it is used.  It will reset back to 0 after about 5 seconds of non-use.  So it is designed for one-shot usage for things like renaming or indexing, but not for use in a pane or file list column.
Title: Re: Problem with counter() for rename files. Possible bug?
Post by: cron0sRXR8 on April 22, 2013, 12:48:23 pm
FYI: Counter() continues to count so long as it is used.  It will reset back to 0 after about 5 seconds of non-use.  So it is designed for one-shot usage for things like renaming or indexing, but not for use in a pane or file list column.

ok! thank for the information!!