GenerateFilename Task
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 parameters (Set, Get): EXTENSION, NUMBER, DIRECTORY, PREFIX, RANDOM
Output parameters (Get only): OUTPUT_FILENAME
Parameters marked as "Set" are those that you can set to specific values. You can also retrieve their current values any time. Parameters marked as "Get" are those whose values you can retrieve but not set.
Input Parameters
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 parameter, the directory will set to the ENVI temporary directory.
PREFIX (optional)
Specify a scalar string denoting the filename prefix.
RANDOM (required)
Add a random number to the filename. The default value is true.
Output Parameters
OUTPUT_FILENAME
This is the output filename.
Methods
Properties
Version History
|
ENVI 5.5 |
Introduced |