how to convert batch file from .tif to .bil format using gdal_translate in windows CMD command line, file in the directory.
Directory path : D:\GDAL-TEST
001_mean.tif
002_mean.tif
003_mean.tif
004_mean.tif
So on....
I have one code but by this code we can convert single file at a time but i want to loop through all raster which have .tif extension in the directory and convert it to .bil format. Please want a solution
My code. I a running this code on GDAL Command window on windows 7 platform.
gdal_translate -of "ENVI" D:\GDAL-TEST\001_mean.tif D:\GDAL-TEST\001_mean.bil
for %%i in (*.tif) do gdal_translate -of "ENVI" %%i %%~ni.bilshould deliver the right filenames. Assuming that the batch is in the same folder as the tif files, and gdal_translate somewhere in the PATH variable. – AndreJ Aug 28 '16 at 08:36