Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
set extended attributes
vinylrecord
hi
Possible ways of setting extended attributes on dcrs?
ASAP reply is required.
Find more posts tagged with
Comments
mogoo
vinylrecord-
Here's a setEA subroutine... Pass in the filepath, EA and value to set. All EA names will have TeamSite/Metadata prepended to the name unless the name begins with "TeamSite" - this is for DCR extended attributes.
setEA('/default/main/test/WORKAREA/johnb/file.html','Owner','jonhb');
---------------------------------------------------
sub setEA
{
my ($file,$eaname,$eavalue) =
@_
;
unless ($eaname =~ m|TeamSite/|)
{
$eaname = "TeamSite/Metadata/".$eaname;
}
my
@arguments
= ();
push
@arguments
, '-s';
push
@arguments
, "$eaname=$eavalue";
push
@arguments
, "$file";
my $eaargs = "-s \"$eaname=$eavalue\" \"$file\"";
if (-e $file)
{# Set if the file exists
if ($eaname)
{# Set if eaname passed in
print STDERR "iwextattr $eaargs\n";
`$iwhome/bin/iwextattr $eaargs`;
}
}
}