title: How to loop through several files using gdal and cmd?
body: <p>I have several files which have the tif format.I would like to translate them to ENVI format.
  I succeeded for one file but I want to do for the rest of files in the directory.</p>
  
  <pre><code>   the first file in the directory is:Ser_W55_20100101_A.tif.
     the second file in the directory is:Ser_W55_20100102_A.tif    and so on .....
  </code></pre>
  
  <p>I am working on windows so I just launch cmd and then wrote the command:</p>
  
  <pre><code> C:\Users&gt;gdal_translate -of "ENVI" D:\Ser_W55_20100101_A.tif D:\Ser_W55_20100101_A.img
  </code></pre>
  
  <p>this worked perfectly. Any ideas please on how to do this for all files and return the same names(with changing from (tif) to ENVI)</p>