Batch convert dgn files to shp files using ogr2ogr

المشرف العام

Administrator
طاقم الإدارة
We have 100's of dgn files which has to be converted to shapefiles.I am trying to use this commands to batch convert all the dgn files in a folder.

for %%f in (.dgn) do ogr2ogr -f "ESRI Shapefile" ".\point\%~nf.shp" "%%f" -where "OGR_GEOMETRY = 'POINT'" -skipfailuresfor %%f in (.dgn) do ogr2ogr -f "ESRI Shapefile" ".\linestring\%~nf.shp" "%%f" -where "OGR_GEOMETRY = 'LINESTRING'" -skipfailuresfor %%f in (*.dgn) do ogr2ogr -f "ESRI Shapefile" ".\polygon\%~nf.shp" "%%f" -where "OGR_GEOMETRY = 'POLYGON'" -skipfailures

But, i am getting "|f" is not recognized as an internal or external command, operable program or batch file "

Could anyone tell me what's the problem with this command ?



أكثر...
 
أعلى