Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Guides   Examples
New in version: 7.3   7.4   7.5   8.0   8.1   8.2   8.3   8.4   8.5   8.6    Statistic  

Container.WriteFile

Writes a file with the given container.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
Container 6.4 Yes Yes Yes Yes Yes
MBS( "Container.WriteFile"; Data; FilePath )   More

Parameters

Parameter Description Example value
Data The container field or value to save. $Image
FilePath The native file path. Something like "/Users/cs/desktop/test.jpg" on Mac and "C:\Programs\Data\test.jpg" on Windows. Files without path end in the root directory on Mac. "test.jpg"

Result

Returns OK or error.

Description

Writes a file with the given container.
See also Files.WriteFile for more options.

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

Read a file and write it elsewhere

Set Variable [$Image; Value:MBS( "Container.ReadFile"; "/Users/cs/Pictures/Test.jpg")]
Set Variable [$r; Value:MBS( "Container.WriteFile"; $Image; "/Users/cs/Desktop/target.jpg")]

See also

Example Databases

Blog Entries

Created 6th September 2016, last changed 21st October 2017


Container.WriteArchive   -   CoreImage.Detect

Feedback: Report problem or ask question.




Links
MBS FileMaker blog