Topics   All   MacOS (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Deprecated   Guides   Examples   Videos
New in version: 10.1   10.2   10.3   10.4   10.5   11.0   11.1   11.2   11.3   11.4    Statistic    FMM    Blog  

Icon.SetIcon

Sets the icon for the file or directory at the specified path.

Component Version macOS Windows Linux Server iOS SDK
QuickLook Files 2.7 ✅ Yes ❌ No ❌ No ✅ Yes, on macOS ❌ No
MBS( "Icon.SetIcon"; Path; image )   More

Parameters

Parameter Description Example
Path The path to the file or folder. "/Applications"
image A container value with some picture. Can be JPEG, GIF, BMP, PNG or TIFF. $image

Result

Returns OK on success.

Description

Sets the icon for the file or directory at the specified path.

This function requires a native path. Use Path.FileMakerPathToNativePath to convert a FileMaker path to a native path if required. If you like to have the user choose the path, you can use FileDialog functions.
For Server be aware that server has limited permissions and may not be able to access all files on a computer.

Examples

Sets icon of a file on the desktop:

MBS("Icon.SetIcon"; "/Users/Christian/Desktop/test.pdf"; Data::image)

See also

Release notes

Example Databases

Blog Entries

Created 18th August 2014, last changed 24th May 2017


Icon.GetIconWithQuickLook - ImageCapture.CameraInfo

Feedback: Report problem or ask question.




Links
MBS Xojo Plugins

Start Chat