Hi code Master ,
How can I make the rename process to assign (1)..(x) at the end of similar items (a number of jpg files accompanying the movie)??
"Same" file names..
Re: "Same" file names..
Not sure, I've never tested that case.
You have two options:
Grab numbers from the filename:
Use duplicate index:
The first one works by grabbing the info from the filename, but you might wanna limit that to ext =~ jpg|png and maybe limit to the end of the filename since you might get bad matches otherwise.
The second is the number of the the identical object got matched. If it's sorted, and all renamed in a batch, then the movie will come first, evaluate to 0 and fail, while the rest will be 1, 2, 3...
You have two options:
Grab numbers from the filename:
Code: Select all
{fn.matchAll(/\d+/).last()}
Code: Select all
{di}
The second is the number of the the identical object got matched. If it's sorted, and all renamed in a batch, then the movie will come first, evaluate to 0 and fail, while the rest will be 1, 2, 3...
Please read the FAQ and How to Request Help.
Re: "Same" file names..
Could you give me a quick guide on how to match with the ext? "limit that to ext =~ jpg|png and maybe limit to the end of the filename" (I tried some stuff but I cannot make it work..)
Thanx in advance!
Thanx in advance!
Re: "Same" file names..
Code: Select all
{if (ext =~ /jpg|png/) fn.match(/\d+$/)}
Please read the FAQ and How to Request Help.
Re: "Same" file names..
Thanx man, I'm not that familiar with java and trying to figure out what does what..