...
Code Block |
---|
REM iterate through each folder and sub folder in your root directory FOR /D /r %%G in ("\*") DO ( REM create a txt file named with just the folder name, not the whole path, with the full paths to all the tifsimage files in the folder dir /s/b %%G | find "tif" > "%%~nxG-index.txt" REM run gdaltindex.exe to create a shape file in the root folder, with the name of the sub-folder, using the txt file above as the optfile D:\Astun\Tools\OGR\gdaltindex.exe "%%G.shp" --optfile "%%~nxG-index.txt" ) |
...