I am using this code to extract info's of all the tab files in a folder. We have a csv list which has, say 100 file names out of 500 files in that folder. How to modify the code only to do ogrinfo's on those particular 100 files listed in a csv ?

for /R .\ %%f IN ("*.tab") DO ogrinfo -al -so "%%f" >>U:\QAQC_131.csv

Edit: This code works fine for me, even the file path has spaces in it

for /F "delims=" %%i IN (D:\QAQC\Open_multi.csv) DO ogrinfo -al -so "%%i" >>U:\QAQC_131.txt

closed as off-topic by Ian Turton Apr 21 '16 at 12:59

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions relating to general Information Technology, with no clear GIS component, are off-topic here, but can be researched/asked at Stack Overflow (software development), Super User (computing hardware and software) and Database Administrators (relational databases)" – Ian Turton
If this question can be reworded to fit the rules in the help center, please edit the question.

  • I tried with this one as mentioned in the link provided. FOR /F %%i IN (D:\QAQC\QAQC_131.csv) DO @echo %%i. But, it's not working And, I don't know how come this is off-topic. ogrinfo in pretty much related to open source GIS and i don't see any reason to ask the questions in software development – joseph_k Apr 21 '16 at 13:18
  • the fact you are running ogrinfo is irrelevant to the question so it is off topic. As you say using echo will work as well. – Ian Turton Apr 21 '16 at 13:19
  • works for me C:\Users\ian\Downloads>FOR /F %i IN (test.txt) do @echo %i gives file1 file2 file3 – Ian Turton Apr 21 '16 at 13:23
  • I am using this code for /F %%i IN (D:\RTXQAQC\Open_multi.csv) DO ogrinfo -al -so "%%i" >>U:\RTXQAQC_131.txt. It's generating the output txt file. But not reading the path since the path in Open_multi.csv has spaces. Will be of great help if you could tell how to make this code to read paths with spaces – joseph_k Apr 21 '16 at 13:28

Browse other questions tagged or ask your own question.