Turning group name to item tag

I have a DB in devonthink, structured with groups.
I want to export all files in the DB to a folder without folder structure.
After exporting I will index all items in exported folder, and will simulate folder structure by Devonthink tagging system.
For this purpose, I need to turn group names of structured DB to item tag before exporting it; but I don’t know how to do this.

If you disable File > Database Properties > Exclude Groups From Tagging for a database, the files will have group tags applied to them.

If you export the files using File > Export > Files and Folders, those tags will be applied as Finder tags. However, note there is no hierarchy in the tags.

I see that if you move a group to the tags, the group becomes a tag. You can convert a hierarchy of groups to a hierarchy of tags.

I took a small hierarchy of files in regular disk folders and indexed them. In DT I highlighted all the groups and dragged them to the tags. That caused the groups to disappear, creating group hierarchy under tags.

As I drag things from one tag to another, they don’t move on the disk. When a document is moved from one tag to another, it appears in the inbox.

You might experiment along those lines.

Thanks, yes this is what I was looking for.

You’re welcome.