IFsrmClassificationManager::SetFileProperty method (fsrmpipeline.h)

Sets the value of the specified property in the file or folder.

Windows Server 2008 R2:  Only files are supported until Windows Server 2012.

Syntax

HRESULT SetFileProperty(
  [in] BSTR filePath,
  [in] BSTR propertyName,
  [in] BSTR propertyValue
);

Parameters

[in] filePath

The file that contains the property that you want to set. You must specify an absolute path to the file. You cannot specify a file share.

[in] propertyName

The name of the property whose value you want to set.

[in] propertyValue

The value to set the specified property to.

Return value

The method returns the following return values.

Remarks

The method verifies that the property value is valid for the property's type. For example, for an ordered or multiple choice list, that the value is a member of the list; for a Boolean property, that the value is the string "0" or "1"; and for a date, that the value is a 64-bit decimal value expressed as a string.

SetFileProperty only supports property definitions that are available on the server whose AppliesTo property has the FsrmPropertyDefinitionAppliesTo_Files (1) bit set.

Examples

For examples in C# and PowerShell see Accessing Classification Properties.

Requirements

Requirement Value
Minimum supported client Windows 8
Minimum supported server Windows Server 2008 R2
Target Platform Windows
Header fsrmpipeline.h (include FsrmPipeline.h, FsrmTlb.h)
DLL SrmSvc.dll

See also

FsrmClassificationManager

IFsrmClassificationManager

IFsrmClassificationManager2

IFsrmClassificationManager::ClearFileProperty

IFsrmClassificationManager::EnumFileProperties

IFsrmClassificationManager::GetFileProperty

MSFT_FSRMClassification