Building url values for a LARGE import, then renaming folder

I should probably preface this with a question as to whether there’s a way to work with the DT DB directly via SQL queries?

I’m working with a large number of folders/files that we’re ftping down from one of our websites. What I need to do is:

  1. Take all the folders on my local drive that are named by the user id from our site, import them into devonthink so that the folders become groups and the files are documents.

  2. Give all the imported documents a url of:[group]/[document]

  3. Then I need to rename the groups to be the user NAME instead of the user id.

Now I can do a quick query from the site’s MySQL database to create a csv or other format that holds the mapping of the userid -> user name with no problem, and if there were a way to run a SQL update query against the DT database I’d have no problem doing this at all, but I’m not quite sure where/how to start doing this in DT?

I could probably work out an automator function to handle the folder renaming from the user id to the user name before importing into DT, but then I’m not sure how I would go about building the file urls?

Hopefully the above makes sense. :slight_smile:

Anyway, thanks in advance to anyone that can provide some help in figuring out how work with the DT database in such a fashion.

No. The only solution is probably AppleScript as Automator is quite limited.