How might export the documents in a database, retaining the folder structure?

I would like to export all the documents from a database, into the MacOS file system, and I would like to automatically create the folders to container the documents, so that they mirror the current structure.

For example, I have a Family database, that has a folder called Cars, and inside that a folder for each car, which contains scans of license documents etc.

I would like to move all those documents into a MacOS folder that mirrors the database structure. Is there a script to do this, or perhaps a menu that I haven’t found yet?

Cheers
Andy

Select the files/folders and File > Export > Files&Folders
As a bonus, file tags are included in the export

I run this weekly in my data backups

Thank you so much. I was trying to do this by selecting things in the left hand menu, and as a result I hadn’t noticed the files and folders menu item.

Cheers
Andy