Change the capture folder of a session
I have many sessions using the default layout where images are imported in the Capture subfolder. As this is making life a bit difficult when using the images from other programs (esp. when using the folder name as a token as this always results in Capture) I want to write a little script that will change the capture folder to the session folder and move all files.
I've looked into the DB file after adding the session folder as a favourite, moving all files from the Capture folder to the new favourite folder and setting it as capture folder. What I see is that in the table ZPATHLOCATION new entries are added where the session folder is represented as '.', which makes sense as it is the current directory. In the ZIMAGE table the ZIMAGELOCATION column uses the entry of the current session folder entry from the ZPATHLOCATION table.
So would it be enough to update the ZRELATIVEPATH for the Capture row in the ZPATHLOCATION table to '.' and move the content of the Capture folder to the session folder. Or am I missing something?
-
> Kees de Bruin: ...am I missing something?
The way to find out is to experiment...
I have never tried to achieve what I think you are aiming at. My first thought would be to do all the operations in Capture One rather than fiddling with the database (though I have done quite a bit of it without problems). I just did the following in Capture One v20 on a Windows PC after opening a session named October_2022:
1) Locate the Session's Capture folder in the System Folders section (right click an image, select Show in Library)
2) Right click the Capture folder, select Reame and entered "oct22_Capture" as the new folder nameCapture One screen did just barely blink before showing the new folder name with the images. The session Library's Capture link now points to the renamed folder. Inspecting the folder structure in my favorite disk tool shows that the folder name changed to oct22_Capture, which I then could of course use in other software.
0 -
Don't hack the data base - it will end badly.
If I've read you problem correctly, the scripting interface has everything you need to make a simple script to relocate the current capture folder to the session folder, create the list of variants to move, and move them into the capture collection. I guess under 10 lines of code... and you will sleep easier at night knowing you didn't inadvertently corrupt your sessions.
0 -
As my scripting skills using AppleScript is rather minimalistic could you point me in the right direction? For now I've created a simple Quick Action script to open a session from Finder but it seems not to open the session, just the last open session(s). I don't want to open each session individually as there are about 200 sessions that need to be updated.
The script I have so far:
on run {input, parameters}
set sessionPath to quoted form of (posix path of first item of input)
tell application "Capture One 22"
open sessionPath
end tell
return input
end run0 -
I have some info on my site for creating scripts/working with Capture One's framework (which you don't need Automator for).
Then, to open a single session, this is much simpler:
on run
set sessionPath to choose file with prompt "Please select a session to process:" of type {"cosessiondb"}
tell application "Capture One 22"
open sessionPath
end tell
end run0
Please sign in to leave a comment.
Comments
4 comments