Paired Sequential Numbering
Hello,
I want to use Advanced for Personal use, I did purchase license with it .
What i am trying to do is do paired sequential numbering taking 1 image that has a front and back
and put a numbering system with the.
EXAMPLE: 00000001F.jpg and then 00000001B.jpg
the the next set would be
00000002F.jpg and 00000002B.jpg and so forth going forward.
I have been playing around with the different numbers etc. and was wondering if someone might be able to help maybe screen shots or detailed explanation of what to do.
Thank you in advance for your help in this.
Regards Bill
I want to use Advanced for Personal use, I did purchase license with it .
What i am trying to do is do paired sequential numbering taking 1 image that has a front and back
and put a numbering system with the.
EXAMPLE: 00000001F.jpg and then 00000001B.jpg
the the next set would be
00000002F.jpg and 00000002B.jpg and so forth going forward.
I have been playing around with the different numbers etc. and was wondering if someone might be able to help maybe screen shots or detailed explanation of what to do.
Thank you in advance for your help in this.
Regards Bill
Reply to #1:
Hello Bill,
This is doable, but how depends on the details.
How are the files currently named and how do you currently know - without opening the picture - which one is front and which one is back?
Regards,
Randy
Hello Bill,
This is doable, but how depends on the details.
How are the files currently named and how do you currently know - without opening the picture - which one is front and which one is back?
Regards,
Randy
Reply to #2:
Randy,
Thank you for your response, Please find below the first four files I am working with.
Filename New Filename Path Error
20260217171511_0031
20260217171511_0032
20260217171511_0033
20260217171511_0034
I use Paper Stream Click Scan to scan my images right now it is Sports Cards.
How i know which is which front or back is Paper Stream does the Front image first giving the card front the ending odd number,
Then the back giving it the even number .
I look at the numbers and make sure they are in order down the list.
And this done with out opening the image.
As I pointed out in my first post was I need them to be .
One image (front of card) 0001F.jpg so this would be the front 20260217171511_0031
(back of card) 0001B.jpg so this would be the back
20260217171511_0032
I hope I explained correctly-.
Randy,
Thank you for your response, Please find below the first four files I am working with.
Filename New Filename Path Error
20260217171511_0031
20260217171511_0032
20260217171511_0033
20260217171511_0034
I use Paper Stream Click Scan to scan my images right now it is Sports Cards.
How i know which is which front or back is Paper Stream does the Front image first giving the card front the ending odd number,
Then the back giving it the even number .
I look at the numbers and make sure they are in order down the list.
And this done with out opening the image.
As I pointed out in my first post was I need them to be .
One image (front of card) 0001F.jpg so this would be the front 20260217171511_0031
(back of card) 0001B.jpg so this would be the back
20260217171511_0032
I hope I explained correctly-.
Reply to #3:
Okay, here's how you do that with a Script renaming method (https://www.advancedrenamer.com/user_guide/v4/method_script ) ...
Create a new script method and paste this next code in the "Pre batch script" and apply it.
//----------------------------------------------------
let filePairNumber = 1; // Starting number for the sequence
function isOdd (num) { return num % 2 !== 0; }
if (isOdd (app.itemCount) ) throw ("There must only be pairs of pictures, front and back!")
//-- End code
//----------------------------------------------------
Then paste the following code in the "function(index, item)" block and apply it.
//----------------------------------------------------
//-- IMPORTANT! The files must be sorted so that a "back" pic always immediately follows its matching front pic.
let isFrontPic = isOdd (index + 1); // Note that Aren's index starts at zero.
let numberSuffix = isFrontPic ? "F" : "B";
let zeroPaddedNum = String (filePairNumber).padStart (8, '0'); // 8 total digits
let newFilename = zeroPaddedNum + numberSuffix;
//-- Only increment the number after done with "back" pics.
if ( ! isFrontPic) filePairNumber++;
//-- Set the new filename:
return newFilename;
//-- End code
//----------------------------------------------------
You will then see that the files are renamed like:
00000001F.jpg
00000001B.jpg
00000002F.jpg
00000002B.jpg
etc.
Hope that helps!
-- Randy
Okay, here's how you do that with a Script renaming method (https://www.advancedrenamer.com/user_guide/v4/method_script ) ...
Create a new script method and paste this next code in the "Pre batch script" and apply it.
//----------------------------------------------------
let filePairNumber = 1; // Starting number for the sequence
function isOdd (num) { return num % 2 !== 0; }
if (isOdd (app.itemCount) ) throw ("There must only be pairs of pictures, front and back!")
//-- End code
//----------------------------------------------------
Then paste the following code in the "function(index, item)" block and apply it.
//----------------------------------------------------
//-- IMPORTANT! The files must be sorted so that a "back" pic always immediately follows its matching front pic.
let isFrontPic = isOdd (index + 1); // Note that Aren's index starts at zero.
let numberSuffix = isFrontPic ? "F" : "B";
let zeroPaddedNum = String (filePairNumber).padStart (8, '0'); // 8 total digits
let newFilename = zeroPaddedNum + numberSuffix;
//-- Only increment the number after done with "back" pics.
if ( ! isFrontPic) filePairNumber++;
//-- Set the new filename:
return newFilename;
//-- End code
//----------------------------------------------------
You will then see that the files are renamed like:
00000001F.jpg
00000001B.jpg
00000002F.jpg
00000002B.jpg
etc.
Hope that helps!
-- Randy
Reply to #4:
Randy
THANK YOU SO VERY MUCH !!!
Can not say how grateful I am to you, followed your instructions and it works WONDERFUL, you just MADE my inputting so much faster and easier.
I would have been months if not longer trying to figure this out ,I am very new to all the coding etc.
Once again THANK YOU.
Best Regards
Bill
Randy
THANK YOU SO VERY MUCH !!!
Can not say how grateful I am to you, followed your instructions and it works WONDERFUL, you just MADE my inputting so much faster and easier.
I would have been months if not longer trying to figure this out ,I am very new to all the coding etc.
Once again THANK YOU.
Best Regards
Bill
Reply to #5:
You are very welcome, Bill.
Happy to help and best of luck to you.
Regards,
Randy
You are very welcome, Bill.
Happy to help and best of luck to you.
Regards,
Randy
Reply to #6:
Hello Randy,
Hope you are doing well I promise i wont become a pest, However I was running my program and all and when i went back to look at everything I noticed that the Backs of my cards in inventory were where the fronts were supposed to be and versea.
I palayed ariund with and finnally put a dash in front of each one and BOOM everything flipped the way it was designed.
You helped me out witht he issue to resolve so I thought I would share with you I attched a screen shot:
let isFrontPic = isOdd (index +1);
let numberSuffix = isFrontPic ? "-F" : "-B";
let zeroPaddedNum = String (filePairNumber).padStart (8, '0');
let newFilename = zeroPaddedNum + numberSuffix;
if (!isFrontPic) filePairNumber++;
return newFilename;
But aafer iwas wondering with out changing a bunch of stuff is the a way in Advance Renammer a person could it to do something like the below example.
Again thank you for your time and consideration.
Kind Regards Bill
Example: 00000001-BB--F.jpg and 00000001-BB--B.jpg
Hello Randy,
Hope you are doing well I promise i wont become a pest, However I was running my program and all and when i went back to look at everything I noticed that the Backs of my cards in inventory were where the fronts were supposed to be and versea.
I palayed ariund with and finnally put a dash in front of each one and BOOM everything flipped the way it was designed.
You helped me out witht he issue to resolve so I thought I would share with you I attched a screen shot:
let isFrontPic = isOdd (index +1);
let numberSuffix = isFrontPic ? "-F" : "-B";
let zeroPaddedNum = String (filePairNumber).padStart (8, '0');
let newFilename = zeroPaddedNum + numberSuffix;
if (!isFrontPic) filePairNumber++;
return newFilename;
But aafer iwas wondering with out changing a bunch of stuff is the a way in Advance Renammer a person could it to do something like the below example.
Again thank you for your time and consideration.
Kind Regards Bill
Example: 00000001-BB--F.jpg and 00000001-BB--B.jpg
Reply to #7:
Hello Bill,
If you just want to insert a "-BB-" in the name then there are several ways to do that.
If it's always "-BB-" then the easiest is to just change:
From: let newFilename = zeroPaddedNum + numberSuffix;
To: let newFilename = zeroPaddedNum + "-BB-" + numberSuffix;
But, it's unclear what your workflow and end result is. And I suspect that it won't always be "BB" (Buffalo Bills?, Basketball? Bloody Battles? ;P )
Regards,
Randy
Hello Bill,
If you just want to insert a "-BB-" in the name then there are several ways to do that.
If it's always "-BB-" then the easiest is to just change:
From: let newFilename = zeroPaddedNum + numberSuffix;
To: let newFilename = zeroPaddedNum + "-BB-" + numberSuffix;
But, it's unclear what your workflow and end result is. And I suspect that it won't always be "BB" (Buffalo Bills?, Basketball? Bloody Battles? ;P )
Regards,
Randy