Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
Creates a directory.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
Files | 2.7 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
(old name: Files.CreateFolder)
Parameter | Description | Example |
---|---|---|
Path | Native path to the new directory to be created. | "C:\Test" |
Returns "OK" or error message.
Create folder on Desktop:
Set Variable [$folder; Value:MBS( "Folders.UserDesktop" )]
If [IsEmpty(Container Export::Name)]
Set Field [Container Export::Name; "Record " & Get(RecordID)]
End If
Set Variable [$path; Value:MBS( "Path.AddPathComponent"; $folder; Container Export::Name )]
Set Variable [$r; Value:MBS("Files.CreateDirectory"; $path)]
Creates directory and shows error:
Set Variable [$r; Value:MBS("Files.CreateDirectory"; $path)]
If [MBS("IsError")]
Show Custom Dialog ["Failed to create directory"; MBS("Text.RemovePrefix"; $r; "[MBS] ")]
Exit Script []
End If
Create a folder:
MBS( "Files.CreateDirectory"; "/Users/cs/Documents/FolderName" )
Create recursive folder structure on desktop:
MBS( "Files.CreateDirectory"; "C:\\Users\\Christian\\Desktop\\test1\\test2\\test3\\" )
// needs MBS Plugin 10.5 or newer
Created 18th August 2014, last changed 23th October 2020