@echo off for %%f in (testcanon?.xml) do ( echo %%f :: Transform and compute digest sc14n -d %%f :: Check digest of "OK" file digestvalue %%~nf-ok.xml )