<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=EN-US link=blue vlink=purple>

<div class=WordSection1>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Sebastian,<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Why not create a script to find all the files and pass it to
ogrinfo.&nbsp; For instance, if I wanted to run ogrinfo on all shapefiles in
mydata, you can do something like this little bash script:<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-indent:.5in'><span style='font-size:11.0pt;
font-family:"Calibri","sans-serif";color:#1F497D'>for shapefile in `find mydata
&#8211;name &#8220;*.shp&#8221;`<o:p></o:p></span></p>

<p class=MsoNormal style='text-indent:.5in'><span style='font-size:11.0pt;
font-family:"Calibri","sans-serif";color:#1F497D'>do<o:p></o:p></span></p>

<p class=MsoNormal style='margin-left:.5in;text-indent:.5in'><span
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>ogrinfo
&nbsp;&nbsp;-al&nbsp; -so $shapefile<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; done<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Bob<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:10.0pt;color:#1F497D'>Bob Moskovitz<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:10.0pt;color:#1F497D'>Seismic Hazards
Mapping Program<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:10.0pt;color:#1F497D'>California
Geological Survey<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Arial","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='mso-margin-top-alt:5.0pt;margin-right:0in;margin-bottom:
5.0pt;margin-left:0in;text-autospace:none'><span style='font-size:8.0pt;
font-family:"Arial","sans-serif";color:navy'>CONFIDENTIALITY NOTICE: This
communication is intended only for the use of the individual or entity to which
it is addressed. This message contains information from the State of
California, California Geological Survey, which may be privileged, confidential
and exempt from disclosure under applicable law, including the Electronic
Communications Privacy Act. If the reader of this communication is not the
intended recipient, you are hereby notified that any dissemination,
distribution, or copying of this communication </span><span style='font-size:
10.0pt;font-family:"Arial","sans-serif";color:navy'>is strictly prohibited.</span><span
style='color:#1F497D'><o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'>

<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> gdal-dev-bounces@lists.osgeo.org
[mailto:gdal-dev-bounces@lists.osgeo.org] <b>On Behalf Of </b>Sebastian E.
Ovide<br>
<b>Sent:</b> Tuesday, October 26, 2010 9:36 AM<br>
<b>To:</b> Frank Warmerdam<br>
<b>Cc:</b> gdal-dev<br>
<b>Subject:</b> Re: [gdal-dev] ogrinfo wildchar in the datasource?<o:p></o:p></span></p>

</div>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal style='margin-bottom:12.0pt'>...probably I will copy (or
move) all the files under the same folder... I do not like too much this
approach... as I would prefer to maintain the original directory hierarchy...
&nbsp;but it will make its job...<o:p></o:p></p>

<div>

<p class=MsoNormal>On Tue, Oct 26, 2010 at 5:25 PM, Frank Warmerdam &lt;<a
href="mailto:warmerdam@pobox.com">warmerdam@pobox.com</a>&gt; wrote:<o:p></o:p></p>

<div>

<div>

<p class=MsoNormal>Sebastian E. Ovide wrote:<o:p></o:p></p>

<p class=MsoNormal><br>
Hi All,<br>
<br>
Is there anyway to make gdal read from multiple folders ? something like
ogrinfo mydata/* ? where mydata has a lot of subfolders and any of those
subfolders have shape files.<br>
<br>
(I have some folders with tens of folders with shape files that I need to
display with to MapServer. Just wondering if I need to create a script or if
there is a shortcut...)<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

</div>

</div>

<p class=MsoNormal style='margin-bottom:12.0pt'>Sebastian,<br>
<br>
This would have to be something supported by the shapefile driver in this<br>
case, and it supports two configurations. &nbsp;One where the datasource is a<br>
file (one of .shp or.shx) in which case it provides one layer. &nbsp;The other<br>
configuration is where a directory is given as the datasource name in<br>
which case it provides one layer per .shx/shp/dbf set in the directory.<br>
<br>
There is no mechanism existing now to do what you want short of constructing<br>
a complicated virtual file collecting several directory based shapefile<br>
datasources. &nbsp; This approach would not be helpful to you, I think.<br>
<br>
Best regards,<br>
<span style='color:#888888'>-- <br>
---------------------------------------+--------------------------------------<br>
I set the clouds in motion - turn up &nbsp; | Frank Warmerdam, <a
href="mailto:warmerdam@pobox.com" target="_blank">warmerdam@pobox.com</a><br>
light and sound - activate the windows | <a href="http://pobox.com/~warmerdam"
target="_blank">http://pobox.com/~warmerdam</a><br>
and watch the world go round - Rush &nbsp; &nbsp;| Geospatial Programmer for
Rent</span><o:p></o:p></p>

</div>

<p class=MsoNormal style='margin-bottom:12.0pt'><br>
<br clear=all>
<br>
-- <br>
Sebastian E. Ovide<br>
<br>
<br>
<o:p></o:p></p>

</div>

</body>

</html>