PickFolder

Introduced

5.0

Description

Asks the user to pick a location in the file system. This is useful when doing an import or export that deals with multiple files in the same directory. For example this could be used to ask the user where to save a series of output images.

Scripting Syntax

    PickFolder( [Title], [HelpText], [DefaultValue] )

Parameters

Parameter | Type | Description
Title | String | Title for the dialog box
HelpText | String | Prompt for the user. For example, "Pick the location of the rendered images folder".
DefaultValue | String | Initial folder in the browser

Return Value

Returns the path that the user picked. It is not guaranteed that the path is valid. An empty string is returned if the user canceled without picking a folder.

Examples

JScript Example

    // Example showing how to use the PickFolder command
    strTitle = "Choose a folder" ;
    strDefault = Application.InstallationPath( siUserPath ) ;

    strPickedFolder = XSIUIToolkit.PickFolder( strDefault, strTitle ) ;

    if ( strPickedFolder.length == 0 )
    {
       logmessage( "User didn't make a choice " + strPickedFolder ) ;
    }
    else
    {
       logmessage( "User chose " + strPickedFolder ) ;
    }

See Also

XSIUIToolkit.FileBrowser | PPGLayout | XSIUtils.EnsureFolderExists

Autodesk Softimage v7.5