@echo off echo "proto to go" set proto_path=.\protocol set protoc=.\bin\protoc-3.19.4-win64\bin\protoc.exe set protoc-gen-go-plugin-path=".\bin\protoc-gen-go.exe" for /d %%s in (%proto_path%\*) do ( %protoc% --proto_path=. --plugin=protoc-gen-go=%protoc-gen-go-plugin-path% --go_out=../../ %%s\*.proto ) echo "success" pause