Set File Name
Table of Contents
Description
The setFileName task is used to set the specified name for a file object.
Syntax
<file_variable>.setFileName(<name>);
where:
Params | Data type | Description |
<file_variable> | FILE | The file that needs to be named. Note: Only the files fetched using the invoke URL task can be used. |
<name> | TEXT | The name that needs to be set to the file object. Note: Please make sure the file name doesn't contain any restricted characters. |
Example
The following example sets the name - sampleFile for the file fetched from the web:
response = invokeUrl [ url: "http://www.africau.edu/images/default/sample.pdf" type: GET ]; response.setFileName("sampleFile");
where:
response
"sampleFile"