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: 12.1   12.2   12.3   12.4   12.5   13.0   13.1   13.2   13.3   13.4    Statistic    FMM    Blog  

Clipboard.SetFiles

Puts a list of file paths on the clipboard.

Component Version macOS Windows Linux Server iOS SDK
Clipboard 5.1 ✅ Yes ✅ Yes ❌ No ❌ No ✅ Yes
MBS( "Clipboard.SetFiles"; Paths )   More

Parameters

Parameter Description Example
Paths The list of file paths. "C:\Users\Christian\Desktop\Jaguar Aqua Graphite.jpg"

Result

Returns OK or error.

Description

Puts a list of file paths on the clipboard.

For server this will modify the clipboard of the user account running the server app on the server computer and not the clipboard of any client.

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.

Examples

Put a file path to clipboard on Windows:

MBS("Clipboard.SetFiles"; "C:\Users\Christian\Desktop\test.fmp12")

Put two file paths on clipboard on Windows:

MBS("Clipboard.SetFiles"; "C:\Users\Christian\Desktop\test.fmp12¶C:\Users\Christian\Desktop\Jaguar Aqua Graphite.jpg")

Put a file path on clipboard on Mac:

MBS("Clipboard.SetFiles"; "/Users/cs/Desktop/todo.rtf")

Write a temp file and put it on the clipboard:

# find a temp file path
Set Variable [ $path ; Value: MBS( "Path.AddPathComponent"; MBS( "Folders.UserTemporary" ); "export.jpg") ]
# write our container there
Set Variable [ $r ; Value: MBS( "Container.WriteFile"; Test::GImage; $path ) ]
# and use it for clipboard
Set Variable [ $result ; Value: MBS( "Clipboard.SetFiles"; $path) ]

See also

Blog Entries

This function checks for a license.

Created 23th April 2015, last changed 17th March 2023


Clipboard.SetFileMakerData - Clipboard.SetHTMLText

💬 Ask a question or report a problem