Sync using tags

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

Moderator: Mr_Noodle

Sync using tags Mon Aug 12, 2019 6:49 am • by boboseyewear
Hi,

Sorry in advance for any language mistakes, I'm Dutch.
I have the following setup in files and folder:

Brand
Products
Model A
model A 1234.jpg (tags: 2018, printing)
model A 5678.jpg (tags: 2019, printing)
Website
model-A-1234.jpg (tags: 2018, website)
model-A-5678.jpg (tags: 2019, website)

I regularly have to send images of current models to our customers. Sometimes for printing, sometimes for websites. So I want all the files containing tags 2019 and printing in a zipped file for easy sending. I usually make ZIP files once a year. But when an image changes later on, I have to replace the file in Products folder and in the ZIP file. Or when the product is no longer available I have to change the ZIP file. I want this automated.

- All files with tags 2019 AND printing should be synced into a folder Brand Products 2019 Printing.
- The destination folder should not contain subfolders (Model A or Model A > Website).
- When a tag is removed from a file the monitored folder (Products), the file in the destination folder (Brand Products 2019 Printing) should be removed.
- The destination folder has to be zipped once or twice a day, without removing it (the Archive function from Hazel deletes the destination folder).
- The zipping only has to occur when the content of the destination folder was changed.
- The previous zipped file should be deleted.

I have to set this up for multiple brands, so there also has to be a minimal impact regarding to the speed of my computer.

Is this doable without scripting? I was thinking of combining it with .SavedSearch.

Love to get your thoughts on this!
boboseyewear
 
Posts: 2
Joined: Mon Aug 12, 2019 6:09 am

Re: Sync using tags Mon Aug 12, 2019 10:51 am • by Mr_Noodle
The syncing based on tag is something that you can't do without scripting, unless, as you mentioned, you use a Smart Folder/savedSearch. Even then, though, it may be tricky. It might be better just to copy the tagged files to a fresh folder each time and zip that whole thing up. Ultimately, though, you'll probably need a script, at least for the zipping part since the Archive action will always remove the originals.
Mr_Noodle
Site Admin
 
Posts: 8217
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Sync using tags Tue Aug 13, 2019 3:06 am • by boboseyewear
My chain of thoughts: a savedsearch is a folder > a folder can be set up to sync to another folder (this part I've got working) > when the savedsearch folder is altered the other folder should be updated

But a savedsearch isn't exactly a folder, is it?
boboseyewear
 
Posts: 2
Joined: Mon Aug 12, 2019 6:09 am

Re: Sync using tags Tue Aug 13, 2019 10:53 am • by Mr_Noodle
No, it's not really. I believe currently, Hazel will not descend into Smart Folders and there are other differences when trying to match a saved search against rules. For instance, the modified time of a folder reflects the last time a file was added or removed, but a Smart Folder's modified time is when the query itself was changed and has nothing to do with the files in it.

I'm afraid some sort of custom script will be needed here.
Mr_Noodle
Site Admin
 
Posts: 8217
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support