Creating a Record in a Duplicate DB Structure?

I’ve split up my data into multiple DBs for performance reasons, each DB with an identical group/folder structure. How hard is it to get the path for a record being browsed, to be able to set that same path in another (named) database? Thanks.

You don’t want to use the Path of the file as it is stored within the database’s “Files.noindex” folder, as that’s dynamic.

But as your databases all have the same group organization structure (and that’s what you should use), that should be self-evident; that or a similar document should go into the same group in the other database.

Sorry to be dense, but I haven’t found the necessary elements w/i the applescript dictionary to do just that, and haven’t seen examples w/i the included scripts (or this forum) either. How does one get the dynamic path of a selected element to be able to assign it in the other DB? Thanks

Even if you could send a document to the same Path, i.e., to the same folder location within “Files.noindex” inside the database package file, that would not accomplish what you want to do – which, I assume, is to place the item within the corresponding group in the other database.

That’s because, for database performance reasons, Christian set up the organization of files and folders in Files.noindex independently of the organization of documents and groups in the database. Unlike the document/group structure, which remains static unless reorganized by the user, the file/folder structure within Files.noindex may change, which could result in a change of the Path used by the database.

The user does not establish the Path of a document.

If the user were to drop a file into a folder within "Files.noindex, this would NOT result in Import of the file into the database, which would remain unaware of it except as an “orphan” file. So using the Path information between databases would not result in moving a document to the same group location in the other database.

In other words, if you are devising a script that would transfer a document in one database from its current group to the corresponding group in the other database, the Path information would not be helpful. You want to look at group location, instead.

It is possible by scripting to move a document from its current group location to another database and to a destination group in that other database. The “Select group” HUD is an example, and there are other scripts that illustrate movement of a document to a desired group.

Another way, by drag & drop to a desired group within another open database, is provided by Tools > Show Groups & Tags. As multiple selections can be made via searches and/or sorting, batches of selected documents can be dragged from a group in one database to a corresponding group in another. I’ve used that approach to archive old records in my financial database, for example. (I’m too lazy to do scripting if I figure I can get the job done in less time than it would take to write and test a script.)

If you want to use the same files/folders in multiple databases, then you have to store them in the filesystem and index them (e.g. via File > Index…)