A good place to start learning about how to use IDL, and the additional routines that ENVI adds to IDL, to create batch scripts for ENVI is in the ENVI documentation under Working with ENVI > Sample Code and Instructions > Overview of ENVI Programming, and then follow the links there for more information.
Because all of ENVI's batch scripting is done with IDL, you may also want to start learning about IDL programming. There are a couple of good books for getting you up to speed on IDL programming. You can find information about them here:
http://www.exelisvis.com/...upport/IDLBooks.aspx
For the specific task that you need to do, you will probably want to check out the documentation for the following ENVI routines:
ENVI_OPEN_DATA_FILE To open your image files in ENVI, if they *are not* in the ENVI format.
ENVI_OPEN_FILE To open your image files in ENVI, if they *are* in the ENVI format.
MATH_DOIT To apply an equation to different bands from the image data.
- Peg