3

I have a large number of files, over 7000. I need to run GDAL commands on those files, but I am limited by 8191 characters in Windows. Is there any way to avoid this limitation?

1
4

first you create a vrt with all your files, then you use this vrt as input of your other tools.

Of course, building vrt will also be limited in number of characters, but :

  • you can use wildcard *, e.g gdalbuildvrt output.vrt /path/to/input/example*.tif

  • you can use a text file with all the names of your input files in it (onefile per line), using gdalbuildvrt output.vrt -input_file_list my_list.txt

0
2

It depends on what GDAL command you want to perform but using optfile as documented in http://www.gdal.org/gdal_utilities.html may come to your rescue.

--optfile file

Read the named file and substitute the contents into the command line options list. Lines beginning with # will be ignored. Multi-word arguments may be kept together with double quotes.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.