Skip to main content
added 107 characters in body
Source Link
AndreJ
  • 77.1k
  • 5
  • 88
  • 163

Two possibilities:

  • Use wildcards to process all files in a directory:

FOR %%F in (D:\Karten\shp\Gemeinden\*.shp) DO ogr2ogr -t_srs EPSG:31466 D:\Karten\shp\neu\%%~nxF %%F

  • Use quotation marks around path and filename:

ogr2ogr -t_srs EPSG:31466 "D:\Karten\shp\Test 1.shp" "D:\Karten\shp\Test 2.shp"

EDIT

This one works for me:

for /R %%F in (*.shp) do ogr2ogr -f "KML" "%%~dpnF.kml" "%%F"

Two possibilities:

  • Use wildcards to process all files in a directory:

FOR %%F in (D:\Karten\shp\Gemeinden\*.shp) DO ogr2ogr -t_srs EPSG:31466 D:\Karten\shp\neu\%%~nxF %%F

  • Use quotation marks around path and filename:

ogr2ogr -t_srs EPSG:31466 "D:\Karten\shp\Test 1.shp" "D:\Karten\shp\Test 2.shp"

Two possibilities:

  • Use wildcards to process all files in a directory:

FOR %%F in (D:\Karten\shp\Gemeinden\*.shp) DO ogr2ogr -t_srs EPSG:31466 D:\Karten\shp\neu\%%~nxF %%F

  • Use quotation marks around path and filename:

ogr2ogr -t_srs EPSG:31466 "D:\Karten\shp\Test 1.shp" "D:\Karten\shp\Test 2.shp"

EDIT

This one works for me:

for /R %%F in (*.shp) do ogr2ogr -f "KML" "%%~dpnF.kml" "%%F"
deleted 1 characters in body
Source Link
AndreJ
  • 77.1k
  • 5
  • 88
  • 163

Two possibilities:

  1. Use wildcards to process all files in a directory:
  • Use wildcards to process all files in a directory:

FOR %%F in (D:\Karten\shp\Gemeinden\*.shp) DO ogr2ogr -t_srs EPSG:31466 D:\Karten\shp\neu\%%~nxF %%F

  1. Use quotation marks around path and filename:
  • Use quotation marks around path and filename:

ogr2ogr -t_srs EPSG:31466 "D:\Karten\shp\Test 1.shp" "D:\Karten\shp\Test 2.shp"

Two possibilities:

  1. Use wildcards to process all files in a directory:

FOR %%F in (D:\Karten\shp\Gemeinden\*.shp) DO ogr2ogr -t_srs EPSG:31466 D:\Karten\shp\neu\%%~nxF %%F

  1. Use quotation marks around path and filename:

ogr2ogr -t_srs EPSG:31466 "D:\Karten\shp\Test 1.shp" "D:\Karten\shp\Test 2.shp"

Two possibilities:

  • Use wildcards to process all files in a directory:

FOR %%F in (D:\Karten\shp\Gemeinden\*.shp) DO ogr2ogr -t_srs EPSG:31466 D:\Karten\shp\neu\%%~nxF %%F

  • Use quotation marks around path and filename:

ogr2ogr -t_srs EPSG:31466 "D:\Karten\shp\Test 1.shp" "D:\Karten\shp\Test 2.shp"

Source Link
AndreJ
  • 77.1k
  • 5
  • 88
  • 163

Two possibilities:

  1. Use wildcards to process all files in a directory:

FOR %%F in (D:\Karten\shp\Gemeinden\*.shp) DO ogr2ogr -t_srs EPSG:31466 D:\Karten\shp\neu\%%~nxF %%F

  1. Use quotation marks around path and filename:

ogr2ogr -t_srs EPSG:31466 "D:\Karten\shp\Test 1.shp" "D:\Karten\shp\Test 2.shp"