I found a few old topics that related to this (e.g. Automatically import from network folder?) but linked posts were lost during the forum upgrade.
The use case for me is I’m using Org-mode (emacs) to write a lot of my notes/documentation/etc. I’m already planning on setting up a cron job that’ll automatically export the project within org into HTML files that will reside on a network share. On OSX, that share is mounted.
What I’d like to do is periodically import files from that folder (not index, so the database is more self contained and synchronization doesn’t rely on links to the indexed items).
I took a stab at writing some applescript scratch to try and solve it, but admit my applescript is incredibly lacking. Does anyone have a script that I can customize that can essentially do something like:
- From “/Volumes/WebDav/org-export/org-python”
- For each file in folder, add to database “Programming” under the /Python/org-python group with overwrite
- Do sync (internal sync within DT to shared drive, which is already setup)
There’s a folder action script that comes with DEVONthink (see the embedded help, chapter Automation) that does just this. Attached it to the folder in question and DEVONthink will happily import whatever ends up in the folder. You can also copy and modify the script to your liking.
i cant find that action script?
im looking for a way to save files to a specific folder and have that imported to the main Devonthink
is that possible?
Did you install the additional scripts via DEVONthink 3 > Install Add-Ons?
sure did, there are scripts there just not the one @eboehnisch is referring to (as far as i can see)
Folder actions can be customized via the Finder’s contextual (see Services submenu) after right-/control-clicking on a folder.
yup i tried that bit there is no service action that i can enable to do so
Also checked in preferences>services but alas no such option
Folder actions are attached and detached from a Finder folder via Services > Folder Actions Setup in the contextual menu of the Finder.
thx @BLUEFROG !
i see this
yet not sure it is what i need. im just looking for a way to define a folder so that when i save/copy anything to that folder Devonthink automatically imports this to the
Inbox group. does any of these things do that? i want the folder to be president that is not a one time action but always when i save to that folder
Import & Delete is a commonly used one.
Under System Preferences >> Services, I do not see “DEVONthink - Import…scpt” options.
In DevonThink, I looked under DevonThink > Install AddOns. The “Additional Scripts” line is greyed out and a small tag says “Installed” (see attached image). However, my DevonThink Scripts folder (see 2nd image attached) does not have a Folder Actions subfolder.
Can you tell me what I am missing here?
I think I’ve got it… There was a Services item called “Folder Actions Setup…”. I ran that script from Finder (used contextual menu by right-clicking on the folder I wanted to convert into an automatic importer). This opened a utility that allowed me to add/apply “DevonThink: Import and Delete”.
I wonder why Apple has made this such a circuitous process. In any case, I’ve got it working now.
Just checking … you don’t want to use the Global Inbox (which per your screen shot is installed)?
Note it shows Installed next to the Additional Scripts in the panel in DEVONthink.
yes, the scripts were indeed installed. However, they weren’t visible until I used “Folder Actions Setup…” under the contextual menu in Finder. It is working now. Thanks.