Batch Rename using Apple Script

Discussion regarding all scripting related questions
Please DO NOT post to this thread anything that is not directly related to scripting of Capture One.

Batch Rename using Apple Script

Postby NN227160UL1 » Thu Apr 16, 2020 12:14 pm

Would love to name and rename variants like this using Apple Script;

Capture Name format is to be "[Capture Name]_[3DigitCounter]"
ex) XXXXXXXXXXXXX_001, XXXXXXXXXXXXX_031, XXXXXXXXXXXXX_257

Batch Rename is to be "[Capture Name]_A_[Current Time (HH)][Current Time (mm)][Current Time (ss)]"
ex) XXXXXXXXXXXXX_A_201232 ,XXXXXXXXXXXXX_A_201541, XXXXXXXXXXXXX_A_210638

Can somebody help??
Many thanks.
NN227160UL1
 
Posts: 6
Joined: Thu Nov 11, 2010 1:26 am

Re: Batch Rename using Apple Script

Postby Jim_DK » Thu Apr 16, 2020 2:05 pm

What you need here can be done mixing text and Tokens; you don't necessarily need AppleScript for it...

https://www.dropbox.com/s/7tr12g4mghyptq7/Screenshot%202020-04-16%20at%2014.59.23.png?dl=0
Jim_DK
Crew
Crew
 
Posts: 673
Joined: Thu Dec 03, 2009 10:00 pm

Re: Batch Rename using Apple Script

Postby NN227160UL1 » Fri Apr 17, 2020 12:23 am

Jim

Thanks for the reply.
With your proposal,

XXXXXXXXXXXXX_001.RAW is to be renamed as XXXXXXXXXXXXX_001_A_082035.RAW

Would love to delete "_001" at the same time.
That is why I would like to put [Capture Name] into the Batch Rename setting.
Any ideas using text&tokes or AppleScript??

Best,
NN227160UL1
 
Posts: 6
Joined: Thu Nov 11, 2010 1:26 am

Re: Batch Rename using Apple Script

Postby Jim_DK » Fri Apr 17, 2020 4:49 pm

Oh. You will need a script to trim original file name then...

Unless - what is [Capture Name] or where is it derived from? If the parent folder of the files was named the same, you could use [image folder name] token in the batch rename.
Jim_DK
Crew
Crew
 
Posts: 673
Joined: Thu Dec 03, 2009 10:00 pm

Re: Batch Rename using Apple Script

Postby NN227160UL1 » Mon Apr 20, 2020 2:50 am

Jim,

Parent folder is just Capture as default.

Capture Name Format: [Capture Name]_[4DigitCounter]
Capture Name: 123456_789A123B_12

Batch Rename Format: [Job Name]_A_[Current Time (HH)][Current Time (mm)][Current Time (ss)]
Job Name: 123456_789A123B_12 --same as Capture Name

Is there any way to rename like that using Apple Script?

Best,
NN227160UL1
 
Posts: 6
Joined: Thu Nov 11, 2010 1:26 am


Return to Scripting



Who is online

Users browsing this forum: No registered users and 1 guest