Export Asset
Verb: export
Available from: <Standard>
Exports an asset, transforming it into a file, and returns the path where this exported file was saved.
Syntax
export --asset(String) (Boolean)=success (String)=value
Inputs
Script | Designer | Required | AcceptedTypes | Description |
---|---|---|---|---|
--asset | Asset | Required | Text | Asset to be exported.
The asset can be imported into the script by the command Import Asset. |
Outputs
Script | Designer | AcceptedTypes | Description |
---|---|---|---|
success | Success | Boolean | Returns "True" if the export was successful or "False" if the export was not successful. |
value | File Path | Text | Path where the exported file was saved. |
Example
The command exports an asset and returns a boolean indicating success, and also returns the full path where the exported file was saved.
defVar --name exportSuccess --type Boolean
defVar --name assetPath --type String
import --name assetFile --type "File" --content cnRmaGppcC1dW3lodGd0 --extension ".txt"
// Exports the reported asset.
export --asset "${asset.assetFile}" assetPath=value exportSuccess=success
logMessage --message "Result: ${exportSuccess}\r\nPath:${assetPath}" --type "Info"
// Returns a boolean with export success and the path where the asset was saved.
Remarks
An asset is needed for export to work in the Asset parameter.