The Path_CreateFolder() function creates a new folder or directory. When used with the savefile() function, a dialog box will appear, allowing the location and name of the new directory or folder to be specified by the user.




pathname – A string containing the entire path and name of the new directory or folder. This path must exist at the operating system, or the directory or folder won’t be created. When the savefile() function is used, the folder/directory location and name should be returned to pathname.

Return value

An integer that returns the value 0 if the directory was created successfully, or the value 1 if an error occurred.


To open a dialog box and allow the user to specify a default location, use the savefile() function. Normally, this function will display a dialog box used to specify a file name and location; however, when used with the Path_CreateFolder() function, a folder or directory can be created instead.

If you use the savefile() function, ignore the file format selection in the dialog box. It doesn’t apply when creating a folder.

Documentation Feedback