2

I have about 150 proto files and am trying to compile them in Windows 10. For one of them called a.proto, in the Windows command line I do:

protoc -I. --python_out =. .\a.proto

Of course I wish not to type this 150 times for different files. What is the easiest way to compile all the proto files?

Saeed
  • 1,848
  • 1
  • 18
  • 26

1 Answers1

1

With Git Bash the use of wildcard to execute protoc for each .proto file in the directory seem to work for me: (not in cmd / powershell)

protoc ./*.proto --python_out=.

Other answers here suggest to use version 3.4.0 to use wildcard, I haven't tried it, but it does not work with 3.6.0 for me. See This answer

Maybe one of the solutions in one of this two questions is a better fit protoc object_detection/protos/*.proto: No such file or directory or How to compile multiple proto files in single command?

openshac
  • 4,966
  • 5
  • 46
  • 77
user10455554
  • 403
  • 7
  • 14