Creating Catalogue Folders
I'm in the process of importing a bunch of old Aperture libraries, however Capture One leaves the files in their original location. I'm trying to write a script to move files into my archive structure, but can't seem to create a new catalogue folder.
set rootArchive to "/Volumes/Photogravure/Archive/"
on createFolder(rootArchive, theDate)
set the theYear to year of theDate as string
set the theMonthNumber to my padNumber(month of theDate as number)
set the theMonthName to month of theDate as string
set the theDay to day of theDate as string
set theDatePath to theYear & "/" & theMonthNumber & " " & theMonthName & "/" & theDay
set theFullPath to rootArchive & theDatePath
do shell script "mkdir -p '" & theFullPath & "'"
set theFullPath to POSIX file (rootArchive & theDatePath)
tell front document of application "Capture One 20"
make new collection with properties {kind:catalog folder, file:theFullPath}
end tell
end createFolder
on padNumber(theNumber)
if theNumber is less than 10 then
return "0" & theNumber
else
return theNumber as string
end if
end padNumber
createFolder(rootArchive, current date)
The script fails with the very unhelpful message:
Error: An error occurred while trying to make this collection. (-2710)
Is this just something that can't be scripted, or am I missing something obvious?
-
I have several Scripts adding collections (album, project, smart album, group) to a catalog. However, I've never had to create a catalog folder, to the best of my knowledge Capture One creates them as you import files into the catalog.
THe way I would approach this would be to create the archive folder as you have done, move the image files to the new folder (Capture One won't do this for you except on import), then use Capture One's locate function to reconnect the files to the Catalog. The locate function is tedious and slow if applied to each individual image, but if applied to a catalog folder it's very fast.
0 -
That's a good idea. The relink command might be the right tool for the job as I'll know the new path of the file.
0 -
A few modifications later and I've got a version that works well. If anyone else has use for it I published it with the rest of my scripts on GitHub.
0
Post is closed for comments.
Comments
3 comments