Sync two variable file types

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

Sync two variable file types Sun May 10, 2015 12:38 am • by manonlaco
I'm not sure if Hazel is the solution I'm looking for, but detailed below is my current need:

My Folder Structure:

    - ./yyyymmdd/yyyymmdd_raw
    - yyyymmdd contains a list of files individually named all with the same extension (.jpg)
    - yyyymmdd_raw contains an identical list of files individually named, all with the same extension (.cr2)
    - Each individual .jpg located in yyyymmdd has a matching .cr2 located in yyyymmdd_raw

I would like Hazel to monitor yyyymmdd and as individual .jpg files are deleted, the matching .cr2 located in yyyymmdd_raw would be moved into the trash. Further, if possible it would be desirable if any name changes that occur within yyyymmdd are also migrated through in yyyymmdd_raw.

Is this possible? Thank you in advance any assistance you can provide.
manonlaco
 
Posts: 5
Joined: Wed Oct 01, 2014 5:07 pm

Re: Sync two variable file types Mon May 11, 2015 11:06 am • by Mr_Noodle
There are a couple problems here. One is that Hazel doesn't have ways to specify actions when a file is deleted, since there's nothing there for a Hazel rule to match. Also, Hazel can't correlate files in two totally different places like that, at least not without some serious gymnastics.

That all said, you could monitor the folder above that one. Create a rule to match that folder, and then run a script to go through the files in that folder and compare them to the other folder. Not the most ideal solution but the only way I can see doing it at the moment.
Mr_Noodle
Site Admin
 
Posts: 11867
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support