Suhr, Ralf wrote:
Hello list,

how can I write the commandline to work on a dos box. The dos box says: program „name“ is not found. On linux it run fine.

ogr2ogr -f "DGN" -sql "SELECT 'LABEL(f:\"Times New Roman\",s:12pt,t:\"' || name || '\")' AS OGR_STYLE, * FROM mytable" export.dgn „PG:dbname=..--..“

Ralf,

The problem, I believe, is that the DOS command parser does not understand
backslash escaping to protect the internal double quotes.  I don't really
know if the above can be processed properly by the DOS command parser.

One option might be to install Cygwin which provides a unix-like shell
interpreter (bash) that should follow normal unix rules.

Alternatively, you could possibly invoke os.execl() in python to invoke
a subproject with preparsed arguments.

I had wanted to suggest using the GDAL/OGR --optfile switch which allows
reading command options from a text file, but on review I think the
escaped quotes will also end up confusing it and you will be no better off.

Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, [email protected]
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent

_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to