Bulk importing files and metadata

February 22, 2007 – 10:46 pm

I’ve added a script to the KnowledgeTree Forge to assist users in importing files and meta data from other systems.

It relies on meta data files based on a .ini configuration file format:

[invoice]

invoice_date=”2006-01-01″

invoice_no=”001002214″

[client]
client_name=”joe bloggs”

invoice and client are the names of field sets, and invoice_date, invoice_no and client_name are fields linked to the field sets.

The script allows you to import a folder structure from the file system, where sub folders are created in KnowledgeTree with the same name. The script allows for an option where the meta data must reside in a file with exactly the same name, but with an extra “.metadata” extension. e.g. somefile.doc must have a meta data file called somefile.doc.metadata.

Field sets and related fields will be created if they don’t already exist, so they don’t have to be created prior to the import.

There is also an option to select ‘copy’ or ‘move’ into the KnowledgeTree repository. I havn’t tested the ‘move’ functionality across drives under windows, so I’m not sure what to expect. Using the ‘move’ should reduce I/O time of transfer. However, if something goes wrong…

Remember to make a backup prior to doing anything!

Post a Comment