[gdal-dev] Re: problem with unwanted white space in input file list
for gdalbuildvrt
Jukka Rahkonen
jukka.rahkonen at mmmtike.fi
Thu Sep 16 08:51:02 EDT 2010
Fabrice LALLAURET - PSV <fabrice.lallauret <at> external.thalesgroup.com> writes:
>
> Hi all,
> I try to use some gdal tools in a batch file on windows and I've a
> strange side effect. Here is a little batch use with fwtools 2.4.7.
>
> @echo off
> echo "Test 1 with file list"
> del listin.txt test1.vrt test2.vrt
> for %%F in (krel*.tif) do @echo %%F>> listin.txt
> gdalbuildvrt -input_file_list listin.txt test1.vrt
> echo "Test 2 with direct argument"
> gdalbuildvrt test2.vrt krel*.tif
......
> After some investigations,(check my file, gdal debug compilation, try on
> linux too, ...), I've found that there is a space at the end of each
> line in my listin.txt. On linux, the same thing produce a clear error :
I tried your batch file and my listin.txt does not have any space
characters at the end of lines. Are you sure that your script did
not ever have space in %%F >> ?
dir /b krel*.tif >listin.txt
gives the same result as
for %%F in (krel*.tif) do @echo %%F>> listin.txt
-Jukka Rahkonen-
More information about the gdal-dev
mailing list