This script by @cgrunenberg copies a group structure.
Note: The script was written for DEVONthink 2. You have to change each line that uses the old identifier
tell application id "com.devon-technologies.thinkpro2"
to
tell application id "DNtp"