Copy most recent file, renaming at the same time

I'm rendering frames from After Effects into a directory. I'd like Hazel to watch this folder for new PNG files, and when it finds one, copy it to a folder in my Dropbox. They key is that I want to rename as I copy, so the Dropbox folder only ever has one frame, the most recent. This way I can keep tabs on the render without filling up my Dropbox.
I tried creating a rule looking for Date Added is after Date Last Matched, and not being able to see how I could use the Copy action to rename on the fly, I tried the world's simplest embedded shell script:
However, this returns an error every time.
Am I approaching this the wrong way?
Thanks in advance for any help.
-Stu
I tried creating a rule looking for Date Added is after Date Last Matched, and not being able to see how I could use the Copy action to rename on the fly, I tried the world's simplest embedded shell script:
- Code: Select all
cp $1 ~/Dropbox/RenderWatch/MostRecentFrame.png
However, this returns an error every time.
Am I approaching this the wrong way?
Thanks in advance for any help.
-Stu