This task scans a folder on disk to find files that can be used to populate a catalog of rasters using the PopulateCatalog task.

This task requires a separate license for the ENVI Catalog Module; contact your sales representative for more information.

Example


; Start the application
e = ENVI()
 
; Get the  task from the catalog of ENVITasks
Task1 = ENVITask('ScanFilesForCatalog')
 
; Catalog the entire ENVI data folder (no subfolders)
Task1.dir = Filepath('', Subdir=['data'], Root_Dir=e.Root_Dir)
Task1.include_subfolders = 0
 
; Run the task
Task1.Execute
 
; Get the  task from the catalog of ENVITasks
Task2 = ENVITask('PopulateCatalog')
Task2.candidate_database = Task1.output_candidate_database
 
; Process all the files one by one synchronously.
Task2.workers = 0
 
; Run the task
Task2.Execute
print, Task2.output_catalog_database
 
; Take note of the newly created catalog file. 
; To load it, go to File > ENVI Catalog, then choose 
; File > Open Catalog and enter this catalog file.

Syntax


Result = ENVITask('ScanFilesForCatalog')

Input parameters (Set, Get): CANDIDATE_DATABASE, DIRECTORY, EXCLUDE_PATTERN, EXTENSIONS, INCLUDE_SUBFOLDERS

Output parameters (Get only): , OUTPUT_CANDIDATE_DATABASE

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


CANDIDATE_DATABASE (optional)

Specify the database file where the list of output files will be stored. If not specified, the candidate rasters will be saved to a temporary file.

DIRECTORY (required)

Specify one or more directories in which to search for files.

EXCLUDE_PATTERN (optional)

Specify one or more substrings to exclude from the scan. Any file whose full path contains one of these strings - anywhere in the path or filename - will be skipped. Wildcards are not required. For example, entering 'temp' will exclude any file located in a folder named temp or any file whose name contains temp.

EXTENSIONS (optional)

Specify an array of extensions containing the patterns for files to match. Include the .hdr extension to ensure the task identifies all ENVI-format files. The default value is set to find all possible known types of ENVI formats. ("ads", "cat", "cdf", "cub", "dim", "dt0", "dt1", "dt2", "grb", "grb2", "grib", "grib2", "h5", "hdf", "hdfeos", "hdf5", "he4", "he5", "hdr", "hgt", "ige", "img", "j2k", "jp2", "json", "l1g", "l1r", "l1t", "met", "nat", "nc", "nitf", "nsf", "ntf", "pvl", "r0", "safe", "sid", "tif", "tiff", "til", "txt", "xml").

INCLUDE_SUBFOLDERS (optional)

Specify if you want the search to include subdirectories.

Output Parameters


OUTPUT_CANDIDATE_DATABASE

The resulting database file where the list of output files will be stored.

Methods


Execute

Parameter

ParameterNames

Properties


DESCRIPTION

DISPLAY_NAME

NAME

REVISION

TAGS

Version History


ENVI 6.3

Introduced

See Also


ENVITask, PopulateCatalog Task, PruneCatalog Task, QueryCatalog Task, MergeCatalogs Task, ExportCatalogToKML Task, ExportCatalogToSTAC Task, Run Models on a Schedule