Add only new files from folder (i.e. no duplicates)

I have a folder with PDF files managed by another program (Mendeley, scientific papers).

I would like to import all files into DT (no indexing) but new files are added frequently. Is there a way to import only new files/non-duplicates?

Control-click (or right click) the folder, scroll down to services and choose Services > Folder Actions Setup. Select DEVONthink - Import to selected group.scpt; when a file is added to the folder you will now be prompted to select which group into which you would like the file to be imported.

Thanks, I didn’t know about folder actions but it works nicely!

The only problem is that this is triggered when you rename/edit a file. Unfortunately, the program managing the files does edit and rename them a lot, so I would import the same file multiple times.

Is there a way to do this from DevonThink and use DT to detect duplicates and not import a renamed file again?

Hmm, that’s beyond my knowledge I’m afraid.

Can I ask why you need to import a copy of the file to Devonthink, and also keep another copy elsewhere on your computer? I may not be understanding your workflow correctly, but if you are importing files that are subsequently re-named/edited, are those imported files not then out of date? I know that your original post mentions that you prefer not to index, but perhaps that might be the better solution for this situation.

I don’t think you’d want DEVONthink automatically deciding to delete duplicates or not import them. In my experience, the program is generally but not always good at deciding when something is a duplicate. Because it’s not 100%, and can never be 100% accurate, it will make mistakes, you’ll get frustrated. You’ll scowl at the postman. He’ll decide not to deliver the notice of your Nobel prize, and then it’s all downhill from there.

Fair question :wink:

Mendeley is a scientific paper managing program. You can add a PDF and it automatically retrieves metadata for citation, renames the file and puts it in a user defined folder. I need all files in Mendeley to generate citations in Word and create a bibtex file for LaTeX.

DevonThink on the other hand is much more suitable for searching papers, finding connections and grouping/organizing them.

Ideally, I would add papers to Mendeley as I used to do. Mendeley will put the renamed file in ‘/Path/to/Mendeley/author/year’. Next I would like to import this newly added file into DevonThink to see related documents, put it in a group, have it searchable etc.

It doesn’t matter that future changes to the filename from Mendeley (which happens…) are not reflected in DevonThink. The files themselves will not be edited.

I hope this makes sense, any idea would help. Right now I do it manually. Works well, but I am too nerd to drag and drop files :wink:

I don’t use LaTeX and I write citations manually, so I can’t really help you out with this particular workflow. I’m a historian, so I guess you could say I’m behind the times.

It’s well worth noting Korm’s advice re allowing AI to decide what files to delete. That said, indexing your folder is probably the best solution. An indexed folder will update to include any recently added files when you have the folder selected and invoke File > Update Indexed Items. The folder can be manipulated/searched within DT in the same manner as any other, and the files moved around to other folders as you please.

OK, maybe you are right about the classification as duplicate.

Problem with indexing: When I index a folder and move the PDF to another group in DT, the PDF reappears. This way I’ll lose track of what I organized and what is new.

It’s not that hard to do it manually, so I’ll stick to that I think.

Thanks for your help!

You might want to describe in more detail what you are doing to see the behavior you describe. You can move indexed documents to other groups in the database, even replicate to other groups in the database, and the document will not again reappear in the group that is indexed into the database.