In order to use DOS Batch for Imagine Command, you have to setup enviroment variables before any use.
For example, the following importtif.bat will not process:
echo "-----------start convert----------"
"d:\work\gi91\root\bin\ntx86\exporttif.exe" -inputfilename "%idir%/2-2.img" -outputfilename "%odir%/2-2.tif" -compressionname None -strip 8 -photointerp Multispectral
echo "-----------End convert----------"
In order to make it work, you have to create a DOS batch template from Imagine, then modify it and start from there.
Step1: Create DOS Batch Template
Use importtif.exe as a example:
Click "Modify Commands automatically", and click Next
Click Next, and then Click "Start Processing Later At", pick up a future time
Click Next, type in your user name and password in order to run scheduler.
After that, click Finish, you will have "Scheduled Batch Job List":
Now Imagine will automatically generate export_tiff-geotiff_1.bat for you.
Step2: Modify Template, and start from there
Open the Export_TIFF-GeoTIFF_1.bat, you will find most part of this DOS batch is setup environment variable (same as Session->Properties).
There settings are very important, which allow you to run this DOS batch without starting Imagine.
Your DOS batch may not run properly if you don’t include these environment variable setup.
Then you can remove the "IMAGINE JOB" part, and start your own:
change to your command, so you will not need *.bcf, and *.bls anymore.
Now you can copy Export_TIFF-GeoTIFF_1.bat to your working folder, and double-click it to run.
I suggest you save it as a template, so next time you can directly start form there.
Note, you can run Export_TIFF-GeoTIFF_1.bat without starting IMGAINE program.