This task generates a filename based on input parameters, in the following order:[directory][prefix][number][random][extension].

Example


; Start the application
e = ENVI()
 
; Get the task from the catalog of ENVITasks
Task = ENVITask('GenerateFilename')
 
; Define inputs
Task.NUMBER = 1
Task.DIRECTORY = Filepath('', /TMP)
Task.PREFIX = 'ISODATA_'
Task.RANDOM = !False
 
; Run the task
Task.Execute
 
; Print the output
Print, Task.OUTPUT_FILENAME

Syntax


Result = ENVITask('GenerateFilename')

Input properties (Set, Get): EXTENSION, NUMBER, DIRECTORY, PREFIX, RANDOM

Output properties (Get only): OUTPUT_FILENAME

Properties marked as "Set" are those that you can set to specific values. You can also retrieve their current values any time. Properties marked as "Get" are those whose values you can retrieve but not set.

Methods


This task inherits the following methods from ENVITask:

AddParameter

Execute

Parameter

ParameterNames

RemoveParameter

Properties


This task inherits the following properties from ENVITask:

COMMUTE_ON_DOWNSAMPLE

COMMUTE_ON_SUBSET

DESCRIPTION

DISPLAY_NAME

NAME

REVISION

TAGS

This task also contains the following properties:

EXTENSION (optional)

Specify a scalar string denoting the filename extension.

NUMBER (optional)

Specify a number to append after the prefix value in the filename.

DIRECTORY (optional)

Specify the directory. If you do not set this property, the directory will set to the ENVI temporary directory.

OUTPUT_FILENAME

This is the output filename.

PREFIX (optional)

Specify a scalar string denoting the filename prefix.

RANDOM (required)

Add a random number to the filename. The default value is true.

Version History


ENVI 5.5

Introduced

API Version


4.2

See Also


ENVITask