echo off setlocal enabledelayedexpansion set VULKAN_SDK_PATH=D:\VulkanSDK\1.1.108.0 for %%f in (*.vert *.frag) do ( set ext=%%~xf set ext=!ext:~1! %VULKAN_SDK_PATH%\Bin\glslangValidator.exe -V %%f -o %%~nf-!ext!.spv )