Running a script after compile?

I’m not sure if this is possible, and I didn’t have much luck with searching because the word “script” is pretty popular on here :slight_smile:

What I want to do is run an arbitrary script, like a command line command, after Compile is over. So for example, I might run Compile then the script copies the generated files into a new directory with the current date and time. That’s just an arbitrary example. It could be either just an arbitrary bash command or pointing at a certain script file to run or something like that.

Can Scrivener do anything like that?

Scrivener itself, no, but automation is usually within the purview of the OS. :slight_smile: AppleScript (Folder Actions in particular could be handy), Automator, cron, daemons and even third-party tools like Hazel or Keyboard Maestro can help you glue together different workflows, cause things to happen when certain conditions are satisfied (.txt file appears in folder X, process it), etc.