Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server (Not)   Client   Old   Guides   Examples
New in version: 6.2   6.3   6.4   6.5   7.0   7.1   7.2   7.3   7.4   7.5    Statistic  

Container.Rename

Renames the file path in a container value.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
Container 3.0 Yes Yes Yes Yes Yes

MBS( "Container.Rename"; ContainerField; name )

Parameters

Parameter Description Example value
ContainerField The container field or value to inspect.
name New file name or new path list. "test.jpg"

Result

Returns modified container value or error.

Description

Renames the file path in a container value.
Does only work for normal containers, not with referenced files.

Examples

Renames an image to have a new file extension.

$oldname = MBS( "Container.GetName"; $container )
$newname = substitute($oldname; ".jpg"; ".png")
$newcontainer = MBS( "Container.Rename"; $container; $newname )

Rename external saved container:

#rename field container into variable
Set Variable [$newContainer; Value:MBS( "Container.Rename"; test::file; "test.txt" )]
#Put new container in field
Set Field [test::file; $newContainer]
#write changes to disk
Commit Records/Requests []

See also

Example Databases


Container.Remove   -   Container.RenameStream

Feedback: Report problem or ask question.




Links
MBS Xojo Chart Plugins