I'm trying to convert .shp files to .kml files. I used a batch file to find all .shp files in a directory and its sub-directories and convert them to .kml. Some converted and some gave me the error "Unable to open datasource with the following drivers". I worked out that it was not converting due to spaces existing in the file names. When I got rid of spaces in the file name, it converted.
With that said, I need the files to be the same name so that they can be referenced by other programs correctly. Is there a way either in ogr2ogr or in windows cmd line to accommodate for spaces in files names when being batch converted?