Page 1 of 1

Import to DTPro Group without duplicates!

PostPosted: Fri Dec 16, 2016 3:30 pm
by tbrock1981
Hi Everyone,

I am trying to use Hazel and Automator to input files to a specific DTPro group. The situation is this: My staff adds photos into specific folders on our shared drive where they need to stay forever. There is one big folder, then a series of small folders that each have photos added to them about once a week, but not on a set schedule. I would like an automation set up that goes through each folder and inputs the folders and photos into a specific Group on Devonthink Pro. What I have right now almost does this:
https://www.dropbox.com/s/sfljilqymnedpxv/Screenshot%202016-12-16%2014.25.49.png?dl=0


The automator is as follows:

https://www.dropbox.com/s/nj2iu408jld7gbi/Screenshot%202016-12-16%2014.28.56.png?dl=0

This works, except instead of only adding the newest files, it just adds everything, again. So, the old files are still there, right next to a duplicate of the new ones. Not exactly what I'm looking for. I feel like the answer should be obvious, but I'm not thinking of it.

thanks for your help,

Terry

Re: Import to DTPro Group without duplicates!

PostPosted: Fri Dec 16, 2016 3:49 pm
by Mr_Noodle
Depending, one of the following might help:

- Add a condition like "Date added is after date last matched" to only match when the folder first appears.
- Have the rule set a tag on the file which the rule can also check to make sure it doesn't execute more than once.

Give one of those a try and report back if neither works.

Re: Import to DTPro Group without duplicates!

PostPosted: Fri Dec 16, 2016 4:14 pm
by tbrock1981
Okay, we're part way there.

I went ahead and added the "Newly Added Items" call to the rule...is this what you were basically talking about?

https://www.dropbox.com/s/bayvikiuo1ewh9p/Screenshot%202016-12-16%2015.11.34.png?dl=0

Results in this case were mixed. If I add a new folder of images, it imports that folder without any duplicates. But, if I add any new images to those already existed folders, nothing happens. I need both of these things to happen!

Also...No Date Added is appended to these images, so I went with Date Created.

Thanks for your help!!!

Terry

Re: Import to DTPro Group without duplicates!

PostPosted: Mon Dec 19, 2016 10:19 am
by tbrock1981
any ideas on this? Thanks for your help!!

Re: Import to DTPro Group without duplicates!

PostPosted: Mon Dec 19, 2016 2:27 pm
by Mr_Noodle
Do you want it to re-add it if something is added to a folder? If so, then you'll need to check date modified on the folder.

If you want to also do it if a file is modified underneath that folder, then that's a whole other thing on top of that.

Re: Import to DTPro Group without duplicates!

PostPosted: Mon Dec 19, 2016 2:34 pm
by tbrock1981
Here's the situation: I have one "big" folder that I currently have Hazel set up to act on, and I have people adding many "small" folders to the folder throughout the year that have images in them. This does not always happen on the day the "small" folders are created.

So, there are two situations that I'd like Hazel to push files to a specific DTPro Group, if:

a) a new "small" folder is added to the "big" folder

and

b) if new items are added to any "small" folder

I hope that answers your question!

thanks,

Terry

Re: Import to DTPro Group without duplicates!

PostPosted: Tue Dec 20, 2016 1:22 pm
by Mr_Noodle
As mentioned, I'd use date modified (along with another condition for date added).

Re: Import to DTPro Group without duplicates!

PostPosted: Wed Dec 21, 2016 10:05 am
by tbrock1981
Still not getting anything. In this case, Date Modified is not sending anything to the folders, including when I add a brand new document or image to the system. Here's my most recent rule:

https://www.dropbox.com/s/ge15wb1tj7o2pw8/Screenshot%202016-12-21%2009.02.26.png?dl=0

Terry

Re: Import to DTPro Group without duplicates!

PostPosted: Wed Dec 21, 2016 1:17 pm
by Mr_Noodle
You need to have date added and date modified compared against date last matched. Basically:
Code: Select all
    If (any) are met
       Date modified is after date last matched
       Date added is after date last matched


You'll probably need to have that in a nested condition so that you can do (all) with the "Kind" condition. Instructions here: https://www.noodlesoft.com/kb/how-to-cr ... onditions/