#1 : 28/03-17 06:16 DW
Posts: 7
|
Hi,
I am trying to rename the files from my photo shoot camera default name. Files come in .jpg and .CR2. I have edited some of them already which produces a third type .xmp. The saved file from editing has E1, E2 etc after the default file name and before the extension. I want to rename and renumber the files preserving the extensions and the edited ones with E1, E2 etc. The problem I am encountering is that the program wants to renumber two or more files that have the same number portion sequentially. For example I have: IMG_0569.CR2 IMG_0569.xmp IMG_0569E1.jpg I want to rename to: BlckDiamond17_001.CR2 BlckDiamond17_001.xmp BlckDiamond17_001E1.jpg Any help would be appreciated, Thank you, DW |
#2 : 28/03-17 17:47 G. Lambany
Posts: 187
|
Reply to #1:
try this script: main script: https://pastebin.com/Y98XMEuU Pre-Batch: https://pastebin.com/0XX1bPfv cheers |
#3 : 29/03-17 03:22 DW
Posts: 7
|
Reply to #2:
Thank you G. Lambany. However, I am a complete noob and not sure how to implement the code within the program. Could you provide instruction on how to process. I loaded some test files, used Add Method and then Script. I copied and pasted one of the scripts (I think Pre Batch) in the Show in Windows. I then hit Start Batch, pressed Start Rename. Then the files no longer appear in the box. I go the directory where the files are and they are the same. I must be missing a step or two. Not sure what the difference between Main Script and Pre-batch or if I need to use both scripts you provided. Thanks, DW |
#4 : 29/03-17 05:09 G. Lambany
Posts: 187
|
Reply to #3:
Ha, yes, sorry about that you need to use both the main one goes into the button "show in window", or the small box you see directly in the method pre-batch goes into the windows shown when you press "pre-batch" button advanced renamer is a bit clunky for scripts, but kinda works in the end cheers |
#5 : 29/03-17 06:58 DW
Posts: 7
|
Reply to #4:
I pasted the scripts in their respective windows and the result showed. Invalid Script: Line 4 ZERO_PAD Not Defined (in red). Perhaps we can use the various codes within the predefined modules to accomplish the equivalent. Would you be able to help me on that if I cannot get the scripts to run. |
#6 : 29/03-17 10:46 G. Lambany
Posts: 187
|
Reply to #5:
I don't think there is a way to do it with the build in methods seems there is something wrong with the pre-batch script can you double check and try again? cheers |
#7 : 29/03-17 14:03 DW
Posts: 7
|
Reply to #6:
I tried it again, with same results. I did notice that before I pasted in the small window (main) there is a line in grey highlight at the top function(index, item) {. I cannot get rid of it. |
#8 : 29/03-17 18:38 G. Lambany
Posts: 187
|
Reply to #7:
Load this method list: https://drive.google.com/open?id=0B8QYp8i8e-rkaG VralBkY1N6U2M cheers |
#9 : 29/03-17 19:10 G. Lambany
Posts: 187
|
Reply to #8:
Nevermind the previous post, I found a bug re-testing the script while making the .aren file.. new, corrected version: https://drive.google.com/open?id=0B8QYp8i8e-rkMW tkV0oxVV9FVDg |
#10 : 30/03-17 07:55 DW
Posts: 7
|
Reply to #9:
Okay, I double clicked on the custom counter.aren file. It brings up the code in the script window. The Apply Script was greyed out. I put the cursor at the end of the script ...(item.name) [1]; and deleted an extra space and the Apply Script was active. However, I ran the script successfully, but the results show the following: IMG_0569_001_001.CR2 IMG_0569_001_001.xmp IMG_0569_001_001E1.jpg Not quite what I was looking for. How about if we just load only the CR2, convert, load xmps, convert and the jpg and covert those. If you can provide the script or replacement codes I can try it that way. |
#11 : 30/03-17 20:28 G. Lambany
Posts: 187
|
Reply to #10:
try this method list: https://drive.google.com/open?id=0B8QYp8i8e-rkN1 MyOU9ubUphTGs the apply button greyed out has no effect, it's just to save any code change. I don't think another way of doing things is required, I just need to understand what the problem is, that's all. I didn't thought you were renaming the files with a previous method in AR, I think this is what happened.. would appreciate if you could give more details on how you want to do things, with more examples, if this method list doesn't work cheers |
#12 : 04/04-17 14:04 DW
Posts: 7
|
Reply to #11:
We are almost there. This is the first time using Advanced Renamer so I did not use any other method in renaming the files. So the results are much better. The only thing is that the renumbered values appear twice in the file name. Instead of BlckDiamond17_001.CR2 I get BlckDiamond17_001_001.CR2. Same with the other extensions. Hopefully just a tweak to your script is all it takes. Thank you for helping me with this. |
#13 : 04/04-17 14:08 DW
Posts: 7
|
Reply to #12:
Hi, It actually worked on my sample set. When I went to close out the script there were actually two scripts loaded. Not sure how that happened. I will test it out on the full set later and report back to you. Many thanks to you and quite the challenge. |