This batch script stops after the loop is completed, (successfully), but I want it to continue to run commands after my loop.
for %%F in (*.tif) do (
echo Processing %%F
echo Computing binary mask
call gdalbuildvrt -a_srs EPSG:25832 -b 1 processed/%%~nF_b1.vrt %%F
gdalbuildvrt -a_srs EPSG:25832 -b 2 processed/%%~nF_b2.vrt %%F
gdalbuildvrt -a_srs EPSG:25832 -b 3 processed/%%~nF_b3.vrt %%F
gdal_calc --type=Byte --creation-option=PHOTOMETRIC=MINISBLACK ^
--creation-option=NBITS=1 --creation-option=TILED=YES ^
--creation-option=COMPRESS=DEFLATE ^
-A processed/%%~nF_b1.vrt -B processed/%%~nF_b2.vrt -C processed/%%~nF_b3.vrt ^
--calc="logical_not(logical_and(logical_and(A==0,B==0),C==0))" ^
--outfile processed/%%~nF.msk.tif
)
dir /b /s *.tif > index.txt
Why would not the next command after the loop run? If I run them individually in in the command line there are no issues.