Page 1 of 1
"Same" file names..
Posted: 03 Apr 2014, 17:13
by tfonias74
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)??
Re: "Same" file names..
Posted: 04 Apr 2014, 06:16
by rednoah
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...
Re: "Same" file names..
Posted: 08 Apr 2014, 07:28
by tfonias74
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!
Re: "Same" file names..
Posted: 08 Apr 2014, 09:55
by rednoah
Code: Select all
{if (ext =~ /jpg|png/) fn.match(/\d+$/)}
if (ext matches jpg or png) then match (number sequence ending with input terminator) from filename
Re: "Same" file names..
Posted: 08 Apr 2014, 10:41
by tfonias74
Thanx man, I'm not that familiar with java and trying to figure out what does what..