The path strings are not escaped, so dissolve[13] is '\a' or '\x07' and not 'a', which makes the path invalid.
For Windows paths, the best practice is to either use forward slashes (like unix), or use raw escape with r as a string prefix, e.g. dissolve = r'C:\OSGeo4W64\apps...' On 12 July 2014 02:21, kalu671 <kalu...@gmail.com> wrote: > Hello Dan, > I tried to use the syntax and I am getting the error: > "The filename, directory name, or volume label syntax is incorrect." > > my syntax is as below: > inFile = "D:\Dir1\Polygons.shp" > outFile = "D:\Dir2\Dissolved_polygons.shp" > > dissolve = 'C:\OSGeo4W64\apps\saga\saga_cmd shapes_polygons "Polygon > Dissolve" -POLYGONS = ' + inFile + ' -DISSOLVED = ' + outFile + ' -FIELD_1= > Value -DISSOLVE= 0' > > subprocess.call(dissolve, shell=True) > > Would you please suggest what did I do wrong? > > Thanks _______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev