<div dir="ltr"><p class="MsoNormal" style="margin-bottom:0.0001pt"><span lang="EN-US" style="color:black">Hello:</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span lang="EN-US" style="color:black"> </span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span lang="EN-US" style="color:black">I´m trying to</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span lang="EN-US" style="color:black"> </span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span lang="EN-US" style="color:black">1. transform coordinates
with ogr2ogr, for every shape in folder “FONTE” and its subfolders</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span lang="EN-US" style="color:black">2. put the results in a
destination (sub)folder "Teste"</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span lang="EN-US" style="color:black">3. organize automatically the
results, in the same manner as in source “FONTE” (results organized in destination
subfolders that have the same names of the source subfolders)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span lang="EN-US" style="color:black"> </span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span lang="EN-US" style="color:black">I succeed in doing
operations 1 and 2 with this string:</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span lang="EN-US" style="font-family:'Courier New';color:rgb(0,112,192)"> </span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span lang="EN-US" style="font-family:'Courier New'">D:\Es\<span style="color:black">FONTE</span>><b><span style="color:rgb(0,112,192)">for /R %f in (*.shp) do</span></b>
<span style="color:red">ogr2ogr</span> -s_srs "+proj=tmerc
+lat_0=39.66666666666666 +lon_0</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span lang="EN-US" style="font-family:'Courier New'">=1 +k=1 +x_0=200000 +y_0=300000 +ellps=intl
+pm=lisbon +units=m +no_defs +nadgrids=DLX_ETRS89_geo.gs</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span lang="EN-US" style="font-family:'Courier New'">b +wktext" -t_srs "+proj=tmerc
+lat_0=39.66825833333333 +lon_0=-8.133108333333334 +k=1 +x_0=0 +y_0=0</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span lang="EN-US" style="font-family:'Courier New'"> +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m
+no_defs" -f "ESRI Shapefile" <b><span style="color:rgb(0,176,80)">Teste</span></b>
<span style="color:rgb(0,112,192)">"%f"</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span lang="EN-US" style="font-family:'Courier New';color:rgb(0,112,192)"> </span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span lang="EN-US" style="color:black">The results go to </span><span lang="EN-US" style="color:black">"Teste"</span><span lang="EN-US" style="color:black">, but with no subfolders</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span lang="EN-US" style="color:black"> </span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span lang="EN-US" style="color:black">How can I include operation
3 in that string?</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span lang="EN-US" style="color:black"> </span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span lang="EN-US" style="color:black">Between</span><span lang="EN-US" style="font-family:'Courier New';color:rgb(0,112,192)"> </span><b><span lang="EN-US" style="font-family:'Courier New';color:rgb(0,176,80)">Teste</span></b><span lang="EN-US" style="font-family:'Courier New'"> </span><span lang="EN-US">and</span><span lang="EN-US" style="font-family:'Courier New'"> <span style="color:rgb(0,112,192)">"%f" </span></span><span lang="EN-US" style="color:black">I’ve tried to include</span><span lang="EN-US" style="color:rgb(0,112,192)"> </span><span lang="EN-US" style="font-family:'Courier New';color:rgb(0,112,192)">"%~dpf"</span><span lang="EN-US" style="font-family:'Courier New';color:black">,</span><span lang="EN-US" style="font-family:'Courier New';color:rgb(0,112,192)"> "%~dpnf" </span><span lang="EN-US" style="color:black">and</span><span lang="EN-US" style="font-family:'Courier New';color:rgb(0,112,192)"> "%~dpnf.shp" </span><span lang="EN-US" style="color:black">but always
got errors.</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span lang="EN-US" style="color:black"> </span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span lang="EN-US" style="color:black">From: </span><span lang="EN-US" style="color:black"><a href="http://gis.stackexchange.com/questions/25366/ogr2ogr-convert-all-shapefiles-in-a-directory" target="_blank">http://gis.stackexchange.com/questions/25366/ogr2ogr-convert-all-shapefiles-in-a-directory</a>
</span><span lang="EN-US" style="color:black"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span lang="EN-US" style="color:rgb(0,112,192)"> </span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span lang="EN-US" style="color:black">Thank you very much</span></p><div><div><p><span style="font-size:11pt;color:rgb(31,73,125)">Pedro Monteiro</span></p><p></p><p><font color="#1f497d"><span style="font-size:15px"><br></span></font></p><p><br> </p><br><br>
<p> <br></p><p><br></p><br></div></div>
</div>