# FileSystemNewFolder

New to Analytica 6.0

Requires Analytica Enterprise edition or better.

## FileSystemNewFolder( name, parentFolder )

Creates a new folder with the name «name», if it doesn't already exist, and returns its full path.

The optional «parentFolder» specifies the location where the new folder is created. When this is specified, the new folder must be located in the «parentFolder».

When «parentFolder» is omitted and «name» is not a full absolute file path, then «name» is interpreted relative to the CurrentDataFolder.

«name» can be a full path to the folder. All folders along the path that don't already exist are created.

## Examples

• FileSystemNewFolder( "c:\DataFeeds\ISO" )
This might create two nested folders: "C:\DataFeeds" and "C:\DataFeeds\ISO"
• FileSystemNewFolder( "MyData" )
Creates a folder named "MyData" inside the ]]CurrentDataFolder]]. Returns the full path.
• FileSystemNewFolder( "Data", "D:\Documents\Models" )
Creates the folder "D:\Documents\Models\Data"

## Use in ACP

There are other ways to create a new folder using RunConsoleProcess or system COM objects, but these other methods may be unavailable for security reasons when you run your model on the public Analytica Cloud Platform (ACP) server, whereas this one is available and secure on ACP.

In general, you will only be able to create a new folder using this function inside your model's own project directory.