Here are some loop codes you can use to import imagery using GDAL. The first is a loop to import all bands in an image. This is particularly useful if you are importing hyperspectral data.
C:\Data Folder\ for /l %b in (1,1,#of bands) do gdal_translate -of rst -b %b filename.img filename_%b.rst
(as always, choose the file types accordingly, in this example I’m converting a multiband IMG into RST)
This next one is for converting all of a certain file format (i.e., tif) within a directory to another file format (i.e., rst)
C:\Data Folder\ for %i in (*.tif) do for /l %b in (1,1,#of bands) do gdal_translate -of rst -b %b %i outrst\%~ni_%b.rst
To do this see the FWTools/GDAL post below. Open FWTools then change directories to where your data is.