Renumering files without skipping

Advanced Renamer forum
#1 : 15/05-16 22:22
GbMedusa
GbMedusa
Posts: 2
I'm renaming a folder of images downloaded from a website. After importing I get a list like this:

01.jpg
02.jpg
.
.
.
09.jpg
10.jpg
10345_01.jpg
10345_02.jpg
11.jpg
12.jpg
.
.
.
index.jpg

I'm using the folder name to rename the images.

I have three "Replace" methods

1) for the 10345_0x files: <DirName:1> - 0x
2) for the index file: <DirName:1> - 03
3) and for the xx.jpg files: <DirName:1> - <Inc Nr:4:1>

I'm having trouble with the xx files. Although it doesn't rename the non-xx files, it still considers them in the numbering scheme. So the list becomes:

<Foldername> - 04.jpg << was 01/this is ok
<Foldername> - 05.jpg << was 02/this is ok
.
.
.
<Foldername> - 12.jpg << was 09/this is ok
<Foldername> - 13.jpg << was 10/this is ok
<Foldername> - 01.jpg << was 10345_01/this is ok
<Foldername> - 02.jpg << was 10345_02/this is ok
*not working*<Foldername> - 16.jpg << was 11/should be 14
*not working*<Foldername> - 17.jpg << was 12/should be 15
.
.
.
<Foldername> - 03.jpg << was index/this is ok

To get it to work, I have to manually move the non-xx files to the top of the list and change <DirName:1> - <Inc Nr:4:1> to <DirName:1> - <Inc Nr:1:1>.

Question: is it possible to either 1) ignore the non-xx files in the renumbering scheme or 2) designate certain files be moved to the top/bottom of the list automatically? This is the one thing stopping the program from being a two-click renaming solution for me.

I thought that scipting may be a solution (for any xx.jpg file, add 3 to the Filename and append the folder name to the beginning), but my Javascript is too weak to figure that one out yet.

Any assistance you can provide would be greatly appreciated. Please keep up the excellent work with the program.


15/05-16 22:22 - edited 15/05-16 22:25
#2 : 17/06-16 06:06
G. Lambany
G. Lambany
Posts: 187
Reply to #1:
I think what you are looking for is the "mark by pattern" feature of AE.

1-In the list of files in AE, right click and select the mark->mark by pattern option
2-Check the regular expression option
3-Enter this for the pattern (will accept some lenght difference of the two number fields and the extention, for example .jpg and .jpeg, .png or .gif will work):
^\d+_\d{2,}\.\w{3,4}
or the exact 00000_00.jpg format
^\d{5}_\d{2}.jpg


if you want to mark the other kind of files of the 00.jpg kind, with some flexibility:
^\d{2,}\.\w{3,4}
or the exact 00.jpg format
^\d{2}.jpg

note that an inverse mark could also do the work instead of using two patterns

if you want a fully automatic, one click step that is always the same for the whole process, that would be a script and we could look into it, but I'm not sure that is what you are looking for.

cheers!


17/06-16 06:06