This task searches and returns files in a given directory based on a match pattern.

Example


; Start the application
e = ENVI()
 
; Specify directory
Dir = Filepath('', Root_Dir=e.Root_Dir, Subdir=['data'])
 
; Get the task from the catalog of ENVITasks
Task = ENVITask('FindFiles')
 
; Define inputs
Task.DIRECTORY = Dir
 
; Run the task
Task.Execute
 
; Display the result
View = e.GetView()
foreach URI, Task.OUTPUT_URIS do $
  Layer = View.CreateLayer(e.OpenRaster(URI))

Syntax


Result = ENVITask('FindRasters')

Input parameters (Set, Get): DIRECTORY, INCLUDE_SUBFOLDERS, SEARCH_PATTERN

Output parameters (Get only): OUTPUT_URIS

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


DIRECTORY (required)

Specify the directory in which to find files.

INCLUDE_SUBFOLDERS (optional)

Specify whether or not to include subdirectories in the search.

SEARCH_PATTERN (optional)

Specify an array of strings containing the patterns for files to match. The default is *.hdr, which will find all files in ENVI format.

Output Parameters


OUTPUT_URIS

The resulting files found.

Methods


Execute

Parameter

ParameterNames

Properties


DESCRIPTION

DISPLAY_NAME

NAME

REVISION

TAGS

Version History


ENVI 6.3

Introduced

See Also


ENVITask, FindRasters Task, FindVectors Task