Can it do this...?

I have 1000’s of files to organize, and I need a tool to help. I’m going to traverse many directory trees and output to the one true place where all media goes. I think this tool is work my $, but checking first:

  1. Some of my files are organized by Year / Month / file.jpg structure. I’d like to keep this arrangement
    1b. Any photo I handle, I’d like to query the metadata and create Year / Month folder structure in the output dir
  2. Some of my images are in PhotoCD format - highly doubt your app will recognize it (ImageMagick does). Can I launch an IM command if one of those are detected? (haven’t looked at the scripting yet - bad me, I know)
  3. Some of my files are video - can I detect those and run an FFMPEG command on them and output to my working dir?

Hello, and welcome!

I’ll answer your questions inline below:

This is pretty simple to do. In the Write Node properties, you want a couple of tokens (accessible from the action menu to the right of the field) like so:

Retrobatch won’t let it into the workflow because it doesn’t recognize it as an image. If you could convert them to another format RB understands first, that would do the trick.

This is the same problem as the PhotoCD images, sorry. I’d like to be able to handle video in RB some day, but that day is not today.


Hmm… the video/photoCD part is a bummer. I could (re-)write a recursive PHP script to convert it, but if I’m already doing that, I might as well do it for everything.

I can see the problem - “I see you’re a file, but I have no idea what you are, so skip!” is a reasonable default. And the option of “I don’t recognize you, so I’ll just copy you to the output dir” doesn’t work either because it could be in some random dir of random files that might go to any of a dozen output dirs.

Is there no way to launch a shell script for every file? I can think of a decent workaround if that’s possible.

Retrobatch will allow in anything that it recognizes as an image, the problem is that MacOS doesn’t natively recognize .ph files as images so RB doesn’t know what to do with it. If you have something installed that exports a suitable UTI (which is an identifier that lets MacOS recognize the .ph as an image), then Retrobatch should load the image, and you could then use the Shell Script node to do something with it. The trick is the exporting of the UTI.

I guess if you had a native app installed that does the conversions for you, or you write one yourself that exports it real quick (it doesn’t take much), then that might do the trick?

It’s bit fiddly though.

You can read up on UTIs here:

So I was thinking on this some more, and I gave the little export a UTI idea a shot, and it worked. But I’m not a fan of it since I can’t expect everyone to be able to do this.

So here’s an idea that I’m playing with and you can try out now. First, grab the latest build of Retrobatch:

That has two things in it that’ll make what you want possible.

The first is the addition of a hidden pref for folks who have purchased Retrobatch Pro. You turn it on by copying and pasting the following line into the Terminal app and pressing enter:

defaults write com.flyingmeat.Retrobatch allowAllFileTypes 1

That’ll allow all file types to be read by Retrobatch, even text files. Which … can lead to interesting behaviors*

The next is a new option in the Rules node which will let you filter based on file extension. If you select that and put in “File Extension is pcd” then you’ll only get the files passed to your shell script which you’re after.

Try that out and let me know how it works for you.

I’ll probably promote the hidden pref at some point, but I want to see what kind of behaviors it’ll make happen first.

* .sh file are rendered as images, probably thanks to QuickLook. I wonder what other chaos will ensue from this change.