Home
TeamSite
How do I copy metadata from one file to another?
System
Perhaps a very obvious question, but how do I copy metadata from one file to another? Thanks,
Dave
dave@simpleinternet.com
+USA (215) 962-5153
Find more posts tagged with
Comments
Migrateduser
Just extended attributes or metadata embedded in content? I think either way you have to script that. You could probably make it a custom menu item.
Migrateduser
John,
Thanks... actually, that's what I was wondering. This is going to be used in conjunction with an existing custom menu item. I can clearly see how to retrieve the values with iwattrib -l but I'm not certain as to how I would set them.
Thanks,
Dave
dave@simpleinternet.com
+USA (215) 962-5153
Migrateduser
You mean just iwextattr -s?
Try iwextattr -h for detail.
Migrateduser
John,
I've used that for other things but extended attributes aren't metadata, are they?? aren't they mutually exclusive? does iwextattr -s also set METADATA? I'm thinking it's only good for extended attributes. Please advise. Thanks again!
Dave
dave@simpleinternet.com
+USA (215) 962-5153
Migrateduser
My understanding is that metadata is implemented as extended attributes.
Migrateduser
From what I know metadata and extended attributes are similar except metadata is stored in the configured TeamSite metadata database and extended attributes are stored in the backing store.
To set metadata attributes use:
iwextattr -s TeamSite/Metadata/ATTRIBUTENAME=VALUE /default/main/..../file.dcr
And to set an extended attribute use:
iwextattr -s ATTRIBUTENAME=VALUE /default/main/..../file.dcr
hope this helps.
________________
DavidG.
Sydney, Australia
p: +61 2 9244 0152
m: +61 413 269898
james1
"Metadata" is usually an overloaded term. IMHO, it could refer to any of the following three things:
(1) "TeamSite metadata" that TeamSite has always kept track of automatically, such as file creation date, file owner, file permissions, last modified by user, etc. This metadata is stored in the backing store. It is accessible via the "iwattrib" CLT.
(2) "TeamSite metadata" that is created by the TeamSite "iwmetadata.cgi" CGI program. These metadata fields are determined by each customer at each installation. They are stored as TeamSite Extended Attributes, which are stored in the backing store. The name of each EA begins with "TeamSite/Metadata/". This metadata is accessible via the "iwextattr" CLT.
(3) "MetaTagger metadata" is assigned to files by MetaTagger. I don't know much about this. I think that the metadata is stored in an XML document, which itself is stored as one or more EA's on a file. The data is also duplicated in "TeamSite/Metadata/" EA's.
I think you are talking about #2, so you can use the iwextattr CLT. You can also use OpenAPI, or Content Services.
If you are talking about copying #1's kind of metadata from one file to another ... then I guess you need to use chown, chmod, chgrp, etc. Many of those attributes cannot be given arbitrary values, such as last modified by user and creation date.
Hope this helps.
-- James
--
James H Koh
Interwoven Engineering
Migrateduser
James,
Thanks but in that case, one thing alludes me: if #2 is correct, why do I see different things when I type "iwextattr -l" and "iwattrib -l"? I'm interested in changing attributes that I understand are accessed with "iwattrib -l". Thanks,
Dave
dave@simpleinternet.com
+USA (215) 962-5153
james1
iwextattr accesses EA's.
iwattrib access TeamSite file attributes.
They are two completely different sets of data.
Many of the TeamSite file attributes shown by "iwattrib -l" are not explicitly settable, certainly not via iwattrib, which is a read-only CLT. What attributes are you trying to set, and why?
-- James
--
James H Koh
Interwoven Engineering
Migrateduser
Things like: creator, modified, etc. If we were to use a custom menu item to simply copy one file to another location, we want to copy all of the other info to go along with it with a few exceptions. For instance, the "creator" would be the name of the person copying the file.
I hope that makes sense. Thanks,
Dave
dave@simpleinternet.com
+USA (215) 962-5153
Migrateduser
I filed a feature request for this specific to setting last modified (which frequently shows SYSTEM on Windows). I am pretty sure you will not be able to do what you need with iwattrib.
james1
I don't understand.
> Things like: creator, modified, etc. If we were to use a custom
> menu item to simply copy one file to another location, we want
> to copy all of the other info to go along with it with a few
> exceptions. For instance, the "creator" would be the name of
> the person copying the file.
The "creator" of the new file *will* be the person copying the file. Is this or is this not what you want? If it is what you want, then you don't need to modify that attribute. If it is not what you want, then there is no way around it, that I know of. TeamSite will accurately record the user that creates a file, and there is no way that I know of to change that. (If there were, then TeamSite wouldn't be very good at audit trails, etc...)
If you move a file (e.g., "mv" on UNIX or "rename" on Windows) within a workarea, then all file history (and file attributes) will be preserved. Of course, the original file is gone after a move, but you could revert the deleted file to get the original version back. Perhaps this is the end result you are looking for?
-- James
--
James H Koh
Interwoven Engineering
Migrateduser
James,
That's what I had thought. So, to reiterate, if I were to download a file from TS, modify it outside of TS and then reimport it (under the same name, etc.), am I correct to say that the new file would not have any of the meta data that the original file had? This is what I was concerned about. If this is true, I suppose there's no way around it for right now.
Thanks again,
Dave
dave@simpleinternet.com
+USA (215) 962-5153
james1
Some will change, e.g., moddate.
Some will stay the same, e.g. crdate.
-- James
--
James H Koh
Interwoven Engineering