Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a rather puzzling scenario for you, one that I would like to solve with Automator:

We're a startup that creates HD music video content that is streamed online; we've got a custom-programmed Linux/Unix backend that takes HD videos from a folder, processes them for streaming, and throws them up in a Web format so that they can be viewed/streamed/downloaded from our site. Let us call that folder Folder D for the sake of this problem.

When a video editor has a completed project, he or she adds their project to Folder A, Folder B, or Folder C, each of which is a folder on a volume on our SAN. The SAN has 3 volumes, any of which can be mounted RW on one machine at a time, so at any time up to 3 people can be adding content to A, B or C.

What I'd like to do in Automator, if possible:

  1. Watch folders A, B & C for new videos.
  2. When a video is dropped into one of those folders, copy it to Folder D.
  3. Our backend system works on D and then deletes the file from D.
  4. The tricky part is making sure that once the file is deleted from D, it isn't re-added from A, B or C.
  5. Because of the SAN's limited RW access, assume that A, B and C cannot be written to from the machine where Folder D is located.

I am basically unsure of how to specify something like "once this video has shown up once in Folder D, ignore it if it ever shows up again" and don't know a way to do that without somehow accessing the originals on A, B & C and renaming them

share|improve this question
You probably want an AppleScript with a combination of shell scripting rather than an Automator workflow. – daviesgeek Sep 13 '11 at 19:22
You will probably need more than automator as you need to store some information about the state of the process (e.g. the files that have been deleted from D) – Mark Sep 13 '11 at 19:32
Is the video supposed to remain in A/B/C after it's processed from D? Looking at the problem overall I would rather go with a shell/perl/python/ruby script than with Automator. Providing specific coding is difficult though without knowing significantly more about your specific setup. – patrix Sep 13 '11 at 19:42
I think automator is perfect for this. Between Folder Actions and services (to kick things off initially or handle exceptions). You might have a far easier time if you play with these items a bit and negotiate a change in the folder structure. Item 5 makes things hard unless one mac has R/W access to all folders. I also don't see why you want to incorporate duplication detection in the workflow - the backend has that information. It's much harder to implement a blacklist using automator, so why not either stop sending dupes or let the filesystem preserve uniqueness? – bmike Sep 13 '11 at 20:28
Thanks so much for the replies. everyone did pin down the essential issue: a way to flag files that have already been copied to D (and deleted from it) once before. I'll talk to some friends in my IT circles about scripting. I am honestly a bit of a noob at this and just learning automating... I am here for extra IT support so I am learning to create new things on the fly! also, to patrix: AFAIK, the videos will stay in A/B/C until the editors need more space and clear them out. – jonthebastard Sep 14 '11 at 4:12

There is a similar workflow kit at that takes disc images (dvd, bluray, etc.) and converts them to various formats. There are a number of actions you could copy for file movement, etc., and attach them as folder actions to A, B, and C.

It should also be a simple matter to pick and choose which actions and workflows you would require for this.

Even better, the underlying technology for these actions are just shell scripts. If you can write a shell, ruby, python, etc. script, you can create your own Automator action. You could easily store state regarding files in A, B, and C that have already been copied to D and only copy them again if certain criteria are met, such as a change in file size, modify date, or md5 hash.

share|improve this answer

Try using the application Hazel it's $22 with a free 14 day trial. It can implement very powerful rules based workflows.

Create rules to automatically keep your files organized Hazel watches whatever folders you tell it to, automatically organizing your files according to the rules you create. It features a rule interface similar to that of Apple Mail so you should feel right at home. Have Hazel move files around based on name, date, type, what site/email address it came from (Safari and Mail only) and much more

You may have to experiment to get exactly the behavior that you want.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.