Parse only new files


Just getting started with Retrobatch. Is there a way to process only newly added files?

The origin folder grows over time and reprocessing files will take more and more time.

One way I tried was to change the filename or tags of the original files as they were processed. And then filter input files for the filename or tags. But I could not find an option to do that.

Another could be to move the processed originals to another folder.

Any suggestions?


edit: just found the node to add Finder tags. Now I only need a way to filter for them.

1 Like

Hello Bob, welcome to the forum.

There’s no built in way to do this. However, it is possible to to use Folder Actions (which is built into MacOS) to have any new files sent to a workflow. Here’s a sample AppleScript to do this:

use AppleScript version "2.4"
use scripting additions

on adding folder items to theAttachedFolder after receiving theNewItems
	tell application "Retrobatch"
		set d to open "/path/to/retrobatch/workflow/Invert.retrobatch"
		tell d
			execute input items theNewItems
		end tell
	end tell

end adding folder items to

Then using the Folder Actions Setup app (weirdly in the /System/Library/CoreServices/Applications/ folder) you can then pick a folder and attach the AppleScript to it.

I’ll take it as a feature request that you’d like “only process files added to this folder since the last time this was run”.

Thanks! Really helpful. That works for now.

As for “only processing files added since last run”, I can imagine that is technically complex to keep track of that.

In the meantime, being able to filter files by tag would already enable similar functionality: Set the tag to “yellow” on the original file when processing, and each run filter out all the files that have their tag set to “yellow”.

This could also work by editing the filename of the original file (for example add ‘_processed’).