Is it possible to create a versioned file programmatically ? I would like to be able to set up some automatic rules/batch processes to create versions for certain files on a scheduled basis.
So, you want to create a new verson every second day or so? Why, if nothing changed?
This is for a very small set of files … specifically they are tinderbox files. Due to the nature of that application there are modifications made in the background, so they change quite regularly even without direct modification on my part.
From my perspective, having a batch process that I could apply to a smart group which collects files changed within - to use your parameter - the past 2 days, would avoid mindlessly adding revisions.
It would be extremely helpful to be able to augment my workflow.
Thanks
A customized version of these former smart rules might be useful:
You could try to use a smart group selecting all files whose “change date” is two days or so. And then create new version for all files in that group. Though I don’t know how fine-grained the date check is. If a file is changed two days ago, that condition might be true for the next 23 hours.
And that can be combined with a small script creating a new version. There’s code showing how to do that in DT’s scripting dictionary.
I use Smart Rules and AppleScript
Foundation models from Apple Intelligence are quite limited but can be suitable for a task this light. Here is a batch processing configuration using the Chat - Continue if action we blogged about recently.
Increment Counter in Name (AI).dtBatchProcess.zip (1.5 KB)
The only requirement is to have a filename with a counter in it. I tested with e.g., test 0001.txt so a four digit zeropadded counter before the file extension.
PS: This is a proof-of-concept to show a possible approach. Logically, you’d need to adjust the config for your own situation.
PPS: Add a custom shortcut key to launch it and you can quickly increment your filenames.
This is an interesting approach - I will experiment with this further.
The create version smart rule does the trick. I learned a lot from it. I actually understand how the built in versioning facility with versioned databases works now ![]()
For my requirements the script does what I need.
thanks