[FWTools] Shell Script for gdaladdo on a whole directory?

Frank Warmerdam warmerdam at pobox.com
Wed Feb 20 13:12:40 EST 2008


David Fawcett wrote:
> works, I assume that there isn't a 'wildcard mode' and that I will need 
> to write a dos shell script to do a batch run. 

David,

gdaladdo does not support multiple files.

> Can anyone point me to an example of a script like this?  I did a lot of 
> searching, but couldn't find anything. 

You can put something like this in a .bat file:

for %%f in (*.jpg) do gdaladdo --config USE_RRD YES %%f 3 9 27 81

If you choose to do it directly at the commandline make sure you
use %f instead of %%f.  This difference has caused me to pull out
some hair!

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org



More information about the FWTools mailing list