ShellBrowser Delphi Components Documentation
|
Sets properties of files.
class procedure SetProperties(const pFileName: string; const pProperties: TDictionary<TShellColumnId, TShellPropertyValue>; pOptions: TOperationOptions = soDefault); overload; static;
Parameters |
Description |
const pFileName: string |
File 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 pFileName is invalid or if any COM exception occured. |
The following example shows how to set properties "comment" and "author" of a file:
var Properties: TDictionary<TShellColumnId, TShellPropertyValue>; begin Properties := TDictionary<TShellColumnId, TShellPropertyValue>.Create; Properties.Add(TShellColumns.Comment, 'Great song'); Properties.Add(TShellColumns.Author, 'JAM Software'); TJamFileOperation.SetProperties('C:UsersPublicMusicsample.mp3', Properties); Properties.Free; end;