ShellBrowser Delphi Components Documentation
|
Sets properties of files.
class procedure SetProperties(const pFileNames: IItemIdListCollection; const pProperties: TDictionary<TShellColumnId, TShellPropertyValue>; pOptions: TOperationOptions = soDefault); overload; static;
Parameters |
Description |
const pFileNames: IItemIdListCollection |
Files whose properties should be changed. |
const pProperties: TDictionary<TShellColumnId, TShellPropertyValue> |
The properties and values that should be set. |
pOptions: TOperationOptions = soDefault |
Optional: The options to use. |
Exceptions |
Description |
if pFileNames contains no valid ItemIdList or if any COM exception occured. |
The following example shows how to set properties "comment" and "author" of multiple files:
var Files: IItemIdListCollection; Properties: TDictionary<TShellColumnId, TShellPropertyValue>; begin Files := TItemIdListCollection.Create; Files.Add('C:UsersPublicMusicsample.mp3'); Files.Add('C:UsersPublicMusicsample2.mp3'); Properties := TDictionary<TShellColumnId, TShellPropertyValue>.Create; Properties.Add(TShellColumns.Comment, 'Great song'); Properties.Add(TShellColumns.Author, 'JAM Software'); TJamFileOperation.SetProperties(Files, Properties); Properties.Free; end;