Wednesday, 9 May 2018

ogr - List the tab/shp files properties within folders/sub folders w.r.t relative folder path



Currently i am using this command line


For /R "U:\01 My Proj" %f in (*.tab) do ogrinfo -al -so "%f" >>U:\New.txt


to extract all the tab file related information as a text.Instead of giving the path folder...is it possible to run this command w.r.t to the folder wherein which the bat file has been copied ? (Another thing is the sub folders name will have spaces )


What i am trying to do is..save this command as a bat file using notepad & want to run it different folders (like..i'll copy the bat file to the respective folder & execute it).


Will /* in place of Path_folder work ? I've tried that too



Answer



Just leave out the /R option. That makes it recursive:



For  %%f in (*.tab) do ogrinfo -al -so "%%f" >>U:\New.txt

No comments:

Post a Comment