[FWTools] batch gdal_translate ??

Garret garretlewis at gmail.com
Thu Jul 31 13:30:09 EDT 2008


Thank you to everyone who has helped me with my issue.  I just wanted to post
the solution to the problem for others who may have a similar question.

to batch gdal_translate: (here specifically we are converting sids into
jpgs)

1.  in a txt file wihtin the same directory as the sids,  insert:

for %%f in (*.sid) do gdal_translate -of JPEG %%f %%f.jpg

(this will only convert sids to jpgs within the current directory of the bat
file.  to create do it recursively insert /r, for /r %g in (*.sid)...etc. )

2.  save extention as .bat

3.  within FWTools terminal > call filename.bat 

thats all there is to it.

Thanks again.

Garret



Mateusz Loskot wrote:
> 
> Garret Wais wrote:
>> thank you,
>> I have put the recommended script in a bat file.  I tried just double
>> clicking the bat file...didnt work. Then within FWTools I used, >call
>> filename.bat  and that was not working either.  the error I got was
>> "file was unexpected at this time."  >for file *.sid
>> 
>> any recommendations,
> 
> Garret,
> 
> Sorry, I misunderstood you You were asking about .bat files on Windows.
> It's quite frequent question here about using utilities in .bat on
> Windows.
> 
> See this:
> 
> http://lists.maptools.org/pipermail/fwtools/2006-July/000418.html
> 
> you can find much more hints if you scan the list archives
> 
> http://tinyurl.com/batch-fwtools
> 
> Regards
> -- 
> Mateusz Loskot, http://mateusz.loskot.net
> Charter Member of OSGeo, http://osgeo.org
> _______________________________________________
> FWTools mailing list
> FWTools at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/fwtools
> http://fwtools.maptools.org/
> 
> 
> -----
> -- 
> Mateusz Loskot
> http://mateusz.loskot.net
> 

-- 
View this message in context: http://www.nabble.com/batch-gdal_translate----tp18736977p18759536.html
Sent from the FWTools mailing list archive at Nabble.com.



More information about the FWTools mailing list