# Batch convertion of .tab files to a single .gml using ogr2ogr

My task is to convert .tab files from a directory (C:\Users\Vadim\Downloads\vec\MapInfo\snp) to a single GML file (snp.gml). I use OSGeo4w Shell. So I wrote a following command:

ogr2ogr -f "GML" C:\Users\Vadim\Downloads\vec\snp.gml -dsco FORMAT=TAB C:\Users\Vadim\Downloads\vec\MapInfo\snp


But it printed an error:

FAILURE: Unable to open datasource 'C:\Users\Vadim\Downloads\vec\MapInfo\snp' with the following drivers...


• At least -dsco FORMAT=TAB will do nothing because you want to write out GML and that format does not have such dataset creation option. Does ogrinfo C:\Users\Vadim\Downloads\vec\MapInfo\snp list your tab files as layers? – user30184 Oct 17 '18 at 11:20
• no, the same error appears – Vadim Oct 17 '18 at 11:23
• And you certainly have tab files there dir C:\Users\Vadim\Downloads\vec\MapInfo\snp\*.tab ? – user30184 Oct 17 '18 at 11:54
• exactly, it listed all the tabs – Vadim Oct 17 '18 at 11:57
• And is ogrinfo OK if you run it for one of the tab files ogrinfo C:\Users\Vadim\Downloads\vec\MapInfo\snp\my_file.tab? Do you have any other files than .tab and accompanied files (dat, id, map) in that directory? – user30184 Oct 17 '18 at 12:09