It often becomes necessary to copy information or metadata in ENVI header files during remote sensing data processing. IDL is a good tool to write code for doing this, as it is integrated with ENVI and recognises some of the fields in ENVI format HDR files immediately. Here is another solution for copying information from ENVI HDR files using an open-source environment.
The header files (.hdr) of ENVI files are text files which contain the size of the file (pixels and lines) geospatial information and other meta data such as wavelengths, data units etc.,
Not all programs are aware of all items in then header file and some may become lost during processing. ARSF-DAN have made a script available which can copy attributes from one header to another. The script can be downloaded from https://github.com/pmlrsg/arsf_tools and is run using:
To show the available fields the following script (also from the arsf_tools repo) can be used: